Last Updated: February 25, 2016
·
717
· pmaoui

Reasons why crontab does not work

To check if your crontab works :

tail -f /var/log/syslog

The main reason a task (which works in a terminal) will fail on crontab is because of the environment.

Cron passes a minimal set of environment variables to your jobs.

Type env in a terminal, then put in your crontab :

* * * * * env > /tmp/env.output

You'll notice the difference when comparing env and env.output.
Most of the time, fixing the issue just consists to put an absolute path to some bin files.

Source : http://askubuntu.com/questions/23009/reasons-why-crontab-does-not-work