This question already has an answer here:
This evening I have been playing with cron for the first time, and have started experiencing strange results. The script that I am trying to run is a watchdog that allows me to manage a couple other scripts with a web interface. When I run the watchdog script from a shell,
sudo ./watchdog.py it works fine every time, and starts the scripts it is supposed to. When I add it to crotab,
sudo crontab -e with the line
*/1 * * * * /home/user/watchdog.py, it does not start them, or they crash shortly after starting. These scripts do need to run as root, so I have also tried
*/1 * * * * sudo /home/user/watchdog.py, but nothing changed.
My question is 2 part.
1: How do I troubleshoot this?
2: What causes this, and why?