what happens to my script in python that does not run through crontab every minute.
My script has execute permissions and then calls two other scripts in python.
This is the content of my crontab (#crontab -l):
*/1 * * * * /usr/bin/rsm/samplesMonitor.py
Thank you guys.
Check
/var/log/syslogfor errors.Update: According to your log message, the script is running but returning an error code. Cron will email you the output, if you have a mail agent installed.
Try either:
apt-get install exim4change your cron line to log to file, like so:
Update 2: I re-read your question and it acurred to me that maybe you are running into python import issues. You say that your script calls two other scripts. My suggestion would be to test running your script from
/. Python has a default behavior to find imports in the current working directory, so make sure your script can run from any path location.In the crontab, you can set the starting working directory by calling your script from within another shell process. For example: