1

This question already has an answer here:

I have 2 cron jobs that were running fine but now stopped running. I looked through my crontab and everything looks OK. How can I tell if these jobs are running? is there a place where cron stores errors? Where do I look for cron specific errors, or even a record of the cron jobs that ran prior.

marked as duplicate by Community Apr 1 '15 at 21:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • by default every cron job sends email to that user check them with mail command – PKumar Apr 1 '15 at 15:22
  • This posting has an extensive Q&A that explains how to watch cron.log in real time on-screen: askubuntu.com/questions/966194/… – SDsolar Oct 22 '17 at 6:41
3

Try directing the output to a log file. Just make sure that it exists and is writable by whatever user the cronjob is running as. (In my example, this would be cyphertite)

I also recommend running date somewhere at the beginning of your script so that you get the date in the log file.

 0 15 * * *    /home/andrew/daily-backup.sh >> /var/log/cyphertite.log

Additionally, cron logs are directed to /var/log/syslog if that helps

  • ...and can be extracted via grep CRON /var/log/syslog – waltinator Apr 1 '15 at 15:47
  • I was looking for the location of the syslog – EastsideDeveloper Apr 1 '15 at 21:01

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