Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I have a python script running by cron. For what ever reason, it is not running. I am wondering if there is anywhere that error messages are sent? Script runs fine by itself. If I run a simple script with crontab, that just writes to a file that works also.

My crontab is:

*/15 * * * * python ./home/pi/foo/bar.pyw
share|improve this question
    
Ok, I figured out the issue with my script. I was calling modules which were in the same directory as the bar.pyw script. I changed the working directory with os.chdir("some location"). I still however would like to know where the error messages go for crontabs –  Richard Nov 26 '12 at 19:46
add comment

1 Answer 1

By default, the logging for the cron demon is not enabled in Debian (I assume it is the system you are using). To enable it, please open the file /etc/rsyslog.conf via

$ vi /etc/rsyslog.conf

and uncomment the line

# cron.*                          /var/log/cron.log

After that, you need to restart rsyslog via

$ /etc/init.d/rsyslog restart

and you will find the cron logs in /var/log/cron.log

Source: Enable crontab logging in Debian Linux

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.