up vote 0 down vote favorite
1
share [g+] share [fb]

I got this funny problem. I have an entry in the in cron like this

50 15 * * * /pmecs/log/lsmon/techsupportscript.sh 2>/pmecs/log/lsmon/cronerror.log

Now, from what i know, this is correct syntax. This script is supposed to run at 15:50 everyday. But it doesn't. I checked the date,timezone etc, everything is fine.. I change it to

* * * * * /pmecs/log/lsmon/techsupportscript.sh 2>/pmecs/log/lsmon/cronerror.log

i.e run every minute, it runs perfectly.. Can anyone give any suggestions as to how do i find out what is going wrong here?

link|improve this question
1  
When you say "in the cron", do you mean in your own crontab (crontab -e) or in the system's crontab (/etc/cron.d/something) ? The format is different than the one you use in the second case. – Raphink Jan 8 '10 at 10:57
feedback

migrated from stackoverflow.com Jan 8 '10 at 10:51

This question came from our site for professional and enthusiast programmers.

1 Answer

few ways to troubleshoot

1) Check /var/log/cron 
2) check /pmecs/log/lsmon/cronerror.log for clues. 
3) check your mail using mailx/mail. 
4) add a cron.debug to /etc/syslog.conf (search google for examples)
5) try changing the order of redirection

50 15 * * * /pmecs/log/lsmon/techsupportscript.sh >/pmecs/log/lsmon/cronerror.log 2>&1
link|improve this answer
I havent configured mail so i wont get an email. I'll have to try out point number 4. i even tried 50 15 * * * echo "I have been called " > /pmecs/log/lsmon/cronerror.log In /var/log/cron all I could see are BEGIN EDIT and END EDIT. – Uday Jan 8 '10 at 11:09
feedback

Your Answer

 
or
required, but never shown