crontab not executing in sun solaris

July 5, 2011 at 07:50:56
Specs: Sun Solaris
Crontab has been scheduled in Sun solaris. But it is not executing the scripts as per the schedule. When i try to execute the scripts copying from the crontab, it is getting executed perfectly. What could be the reason ?

See More: crontab not executing in sun solaris

Report •

#1
July 5, 2011 at 10:23:46
You are not giving us much to go on, but I have two guesses:

1) Whenever a script runs normally from the command line, but fails from cron, the most likely problem is that the enviromental variable PATH is not set so the default cron user's PATH is used. Also, some other required environmental variable is not being set from the default cron user (i.e. ORACLE_HOME)

2) Maybe your shell invocation is not being declared. By default, the Solaris cron assumes using the bourne shell unless the script expressly declares something else like:

#!/bin/ksh.

I am assuming you are using root user to set up cron. If so, if any error occur from cron, they should be emailed to user root unless the output was sent to another file or location.


Report •

#2
July 6, 2011 at 05:42:07
If you've just added your script to crontab, you have to restart cron, to activate the changes.

You are expecting our help, we are expecting your response !!!


Report •
Related Solutions


Ask Question