Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How can I check when was the last time anacron completed all the daily/weekly/monthly jobs? I understand that the timestamps at /var/spool/anacron are the times anacron started, but it can be that the system was restarted or shutdown between start and completion.

Is it possible to check the status and timestamp of completion of every anacron job seperately?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

When cronjobs fails to run you will get an e-mail in /var/mail/user. This e-mail will contain a line like this:

  Subject: Cron <root@server28> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) (failed)

...

Date: Sun, 12 Feb 2012 06:25:05 +0100 (CET)

/etc/cron.daily/logrotate: error: error running non-shared postrotate script for /var/log/fail2ban.log of '/var/log/fail2ban.log ' run-parts: /etc/cron.daily/logrotate exited with return code 1

You can see the time and which cronjob failed to run.

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.