Hey guys,
I have a script called my_test:
Code:
# !/usr/bin/sh
`touch /usr/test/me`
The script has been saved in /usr/test/my_test
I have executed chmod 755 /usr/test/my_test
Then I have entered it into the cron file using crontab -e
Code:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/test/my_test > /usr/test/mytestlog
I was hoping that the script would be executed every 5 minutes, the file /usr/test/me would be timestamped with the last touch and the last touch would be logged in /usr/test/mytestlog.
What I am finding, every 5 minutes the mytestlog has been created, (timestamped when the cron last fired.) but the /usr/test/me file hasn't been timestamped and the log file is empty.
To me, it looks like the cron is firing, but the script hasn't executed. It executes manually but not from the cron. The script was created by root, the cron was created by root, its displayed in the cron when I type
and it looks like it has fired without error in the /var/cron/log file.
Can anyone shed any light on how I can track down this problem.
Thanks in advance.
Added: Its on a sun box.