dhowells
5th June 2009, 16:30
I have a simple qptool query that I want to run in batch. When I execute my shell script straight from the UNIX line it works fine. When the same script is executed via crontab it doesn't create the output and does create a core dump file.
For testing purposes I have the script simplified to one line as follows:
/baan/bse/bin/qptool6.1 -c200 -f /home/howells/a.qp -o /home/howells/a.txt
Any ideas why this would not run when batched?
Thanks for your help,
Dan
bdittmar
5th June 2009, 16:48
I have a simple qptool query that I want to run in batch. When I execute my shell script straight from the UNIX line it works fine. When the same script is executed via crontab it doesn't create the output and does create a core dump file.
For testing purposes I have the script simplified to one line as follows:
/baan/bse/bin/qptool6.1 -c200 -f /home/howells/a.qp -o /home/howells/a.txt
Any ideas why this would not run when batched?
Thanks for your help,
Dan
Hello,
try this :
export USER=baanusername;sh /baan/bse/bin/qptool6.1 -c200 -f /home/howells/a.qp -o /home/howells/a.txt
Regards
dhowells
5th June 2009, 16:56
I tried your suggestion. Same results.
dave_23
5th June 2009, 23:45
Hey Dan,
try sourcing your .profile in the script (assuming ksh)
#!/bin/ksh
. /home/howells/.profile
/baan/bse/bin/qptool6.1 -c200 -f /home/howells/a.qp -o /home/howells/a.txt
also maybe try adding >/tmp/error.out 2>&1 to the end
Dave
dhowells
8th June 2009, 14:49
Jackpot -- thanks Dave. That did the trick.
Dan