15 pts.
 Shell script does not work on cron
I created a shell script which runs fine from the command line but does not get executed when I added to crontab. I have checked the environmental PATH and added the path to my script to it I also specified the absolute path in the crontab entry. I have scheduled different tasks using the crontab before and they run fine according to the specified schedule. I know that neither the crontab entry nor the environmental variable PATH is an issue but I am not quite sure what else should I look for. Any tip would be greatly appreciated. Thanks.

Software/Hardware used:
ASKED: August 16, 2008  1:31 PM
UPDATED: August 20, 2008  12:56 PM

Answer Wiki:
This is most likely caused by output from the script. Try appending > /dev/null to the end of the line in cron that runs the script. hth
Last Wiki Answer Submitted:  August 18, 2008  6:30 pm  by  Xjlittle   265 pts.
All Answer Wiki Contributors:  Xjlittle   265 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Thank you Xjlittle,
I found that the script has executed fine via cron and produced the output file and only failed the last step (send an e-mail). I had the last step to send an e-mail to a remote mail server and it seems like the connection was timing out and it wasn’t retrying to re-send it later. I fixed it by creating an alias.

 15 pts.