Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Log of cron.daily?

I have a couple of cron jobs in cron.daily which are supposed to execute daily. I know these tasks get executed as I can see the end result. For example: I'm doing a back-up of MySQL DB and I can see the back-up file. However, I cannot find the log for this.

  • I checked /var/log/syslog with a grep CRON /var/log/syslog command all I can find is php5 session clean cronjob(I don't really know what that is)

Where can I find the log for cron.daily?

like image 903
am3 Avatar asked Jun 11 '15 05:06

am3


1 Answers

All cron jobs (in a Debian based system like Ubuntu) are logged in /var/log/syslog. You are looking for "CRON" in all caps, so first step is to do a case insensitive search:

grep -i cron /var/log/syslog

Next, syslog may only show the last 24 hours or less meaning you may not see the daily entry in there. Try searching old syslog files as well:

zgrep -i cron /var/log/syslog*

You should be able to narrow down the results even further using:

zgrep -i cron.daily /var/log/syslog*
like image 70
14 revs, 12 users 16% Avatar answered Sep 22 '22 05:09

14 revs, 12 users 16%