So your crontab entry is failing and you don’t know why. How do you proceed?


  1. Does your crontab end with an empty line? It must or the last entry will not be considered.
  2. Have you forgotten to set your PATH variable?
  3. Have you setup logging and checked the output for errors?

Suggested Crontab Layout

I suggest writing your crontab entries like below.

Start with these two lines

The first line makes sure that none of those annoying “mails” are getting sent. We will rather setup logging for each of our entries instead.

The second line sets a proper PATH variable. For some reason this is not done automatically and your crontab entry might fail because it can’t find binaries you refer to. I came up with the PATH by logging in as some normal user and typing:

Make use of /usr/bin/logger

I suffix each and every of my crontab entries with something like this:

This sets up logging for the crontab entry using syslog ( You can now find the recent log entries by typing:

End with empty line

Finally it’s important that your crontab ends with an empty line or the last crontab entry will not be applied.

Helpful External Article

This StackOverflow question has an excellent step by step troubleshooting answer: