Friday, July 17, 2009

Mysterious cron failures

One of the constant challenges that I face daily is why a particular cron didnt run.
Though I have the script spitting all the output to a output file, sometimes even that doesnt happen / or not enough
And given that we have a matrix of machines spanning over a breadth of the different OS's, I break my head often.

So this should come handy 
--> The most common thing is to associate a email account to the user running the cron so that you can monitor the email. But sometimes it is not possible, so in that case just type "mail" and the last(hopefully, though sometimes it the last mail you had read) mail is displayed which should help you.

--> Look at /var/cron/log or /var/adm/messages - (This hasnt helped me much, though)

--> Check if all the files the script uses has fully qualified domain names in case the files are in a central nfs location

--> One stupid problem once I faced was that the dir where I echo the script didnt have write permissions for the user running the cron and hence failed..



No comments:

Post a Comment