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
Written by pmaoui
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Linux
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#