Cron jobs on Sun Solaris 5.10
807557Sep 9 2008 — edited Sep 11 2008Hi,
Following are the details of my Sun box:
SunOS ocmdf2 5.10 Generic_118833-33 sun4u sparc SUNW,Sun-Fire-V490
I am trying to set up cron job entries using the crontab file. I have copied over my crontab file from the HP-UX machine over to this Sun machine.
I have registered the file with the cron system by running the "crontab crontab.txt" command where contab.txt contains all my cron job entries. After doing so, I noticed that non of the cron jobs are getting executed. One of the cron job is given below for reference:
0 6 * * 2,3,4,5,6 . /usr/local/bin/all_roots > /dev/null 2>&1 ; ksh $TF_FEED_SRC/generate_feed_contents.com standard_feed > $TF_FEED_LOG/standard_feed.cron.log 2>&1
The above cron job entry runs fine on the HP-UX machine, but not on the Sun machine.
Following is the modified version of the above job for the Sun machine.
0 6 * * 2,3,4,5,6 (/usr/bin/ksh ". .profile ; cd /tapes/gen_scripts ; generate_feed_contents.com standard_feed > /tapes/logs/standard_feed.cron.log 2>&1")
Note that in the above modified job, the env variables like TF_FEED_SRC and TF_FEED_LOG are replaced with the actual paths and quotes and parenthesis are used.
Can somebody please advise on:
1) Why the original cron job does not run?
2) What should I do to make the original cron job run?
3) What makes the modified cron job runs?
Thanks in advance for your help.
Regards,
Shiv