I have a cron job that is supposed to run a script every 15 minutes.

*/15 * * * * /path/to/script.sh

I checked in three hours later and found that the script never ran, even once.

Earlier I tried to get it to run every half hour by:

0, 30 * * * * /path/to/script.sh

with the same (lack of) results.

Yes, the script is executable by me and I'm using my own crontab. Any ideas?


Here is what I tried so far:

  1. Tested cron by writing a script to echo helloworld, wrote a crontab to run it every minute and waited around for 15 minutes while nothing happened.
  2. Looked for cron.allow and cron.deny. cron.allow does not exist, cron.deny does but I am not in it.
  3. Looked for the cron logs as was suggested. Don't have read priveleges, will write to request them.
  • Did you check the logs/email? Also, specify linux distribution/cron version. – haimg Dec 23 '11 at 19:12
  • 1
    Does crontab -l show the job correctly? – slhck Dec 23 '11 at 19:21
  • possible duplicate of cron runs but nothing happens – RedGrittyBrick Dec 23 '11 at 19:26
  • @RedGrittyBrick, No it isn't. I read that question first. He misnamed a file. I checked that already. – Yitzchak Dec 23 '11 at 19:39
  • 2
    @Yitzchak: OK. Did you try all the suggestions in the accepted answer? Do you have "cron.* -/var/log/cron" in /etc/syslog.conf? – RedGrittyBrick Dec 23 '11 at 19:42

You may want to go deeper. First of all make sure your cron daemon is actually running. (On some distros it doesn't by default.)

Then take a look at the daemon with strace. Does it actually read the file?

If it does, is there a way to set the logging level to debug? Does the cron daemon try to execute the script? If yes, what's the return code?

If it doesn't, where does it look for cron files? Is your user allowed to create crontabs? Is the file in the directory the crond is looking in?

| improve this answer | |
  • Thanks for the answer! I haven't thought about this problem or needed to use cron in quite a while. Now I have to recreate the situation and learn a bit more about in depth troubleshooting – Yitzchak Jun 23 '13 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.