iguanasleep
Programmer
I did search thru all other cron prob postings here and tons elsewhere, sifted repeatedly thru the crontab and cron man pages, tried anything that seemed remotely applicable but still no luck. let's see if any of you can puzzle this one out - i'm stumped .
I have a script that I have set to run as a cron job. running the script stand-alone from the command line works beautifully (creates some output file), but running it via cron - doesn't complete.
say the script running via cron looks like this (tho for testing purposes I've been having it run at many different times during the day):
0 4 * * M-F /RelMan/rates/myscript
the script itself contains 2 lines:
#!/bin/ksh
/RelMan/rates/action alpha
where 'action' is a script file that contains a line of java and some path variables for completing the java execution, and alpha is just a variable that gets passed into 'action' that the contents of 'action' depend on.
I checked the cron log as well and there is no return code given after the lines where it logs execution of the job (which I assume means rc=0 which = successful). Earlier in my attempts it listed an rc=1, meaning the job itself didn't complete, which I fixed (I think it was a permissions thing). So now it looks as tho cron sees that it completed, but the actual script itself (i.e. subsequent generation of the file via the java execution) is failing to complete.
I've tried sticking in echos as "breakpoints" of sorts, but haven't gotten anything useful spit back at me.
Anyone have any thoughts as to any obvious trip-ups when executing code/scripts via a cron job, or even just better ways of breakpointing to figure out what's not happening and where it's not happening at?
incidentally - this is running under a user's cron job, but I've even tried running it as a cron job under root as same thing.
thnx!!
I have a script that I have set to run as a cron job. running the script stand-alone from the command line works beautifully (creates some output file), but running it via cron - doesn't complete.
say the script running via cron looks like this (tho for testing purposes I've been having it run at many different times during the day):
0 4 * * M-F /RelMan/rates/myscript
the script itself contains 2 lines:
#!/bin/ksh
/RelMan/rates/action alpha
where 'action' is a script file that contains a line of java and some path variables for completing the java execution, and alpha is just a variable that gets passed into 'action' that the contents of 'action' depend on.
I checked the cron log as well and there is no return code given after the lines where it logs execution of the job (which I assume means rc=0 which = successful). Earlier in my attempts it listed an rc=1, meaning the job itself didn't complete, which I fixed (I think it was a permissions thing). So now it looks as tho cron sees that it completed, but the actual script itself (i.e. subsequent generation of the file via the java execution) is failing to complete.
I've tried sticking in echos as "breakpoints" of sorts, but haven't gotten anything useful spit back at me.
Anyone have any thoughts as to any obvious trip-ups when executing code/scripts via a cron job, or even just better ways of breakpointing to figure out what's not happening and where it's not happening at?
incidentally - this is running under a user's cron job, but I've even tried running it as a cron job under root as same thing.
thnx!!