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.

I have logwatch configured with cron to e-mail me a daily report from my ubuntu server. Occasionally, something happens like the power goes out (which is what just happened actually) or the system gets turned off. After turning the system back on, I don't get my daily report, and then sometimes one to a few days later the daily reports start getting sent again.

At this time of writing I haven't received a logwatch report from my Ubuntu server in five days which is the longest time period this has ever gone on for me. So basically, I'm wondering what could I check for problems and what commands could I execute to fix these problems get my daily logwatch reports being e-mailed to me again?

Thanks in advance for your time in helping solve my problem and answer my questions.

Updates:

  • I ran ls -lut /etc/cron.daily and realized my cron scripts haven't been run since may 30th. So cron has stopped working. How can I get it working it again?
  • Checking the syslog also reveals cron hasn't run since May 30th.
  • Running sudo service cron restart got cron working again (I can verify by looking at my hourly scripts being run hourly). Additionally, I ran the logwatch script inside /etc/cron.daily/ so I know the script is working. So I'm hoping that tomorrow around 6:30 AM that cron runs my daily logwatch script.
  • And ... Success! I'm going to summarize what I did and accept it as a best answer.
share|improve this question
    
Is the server off when the cron is scheduled to send the mail? –  nitstorm Jun 8 '11 at 3:51
    
@nitstorm of course not. –  Rob S. Jun 8 '11 at 4:20
    
is your server still capable of sending e-mails, in a non-automated fashion? –  thomas michael wallace Jun 8 '11 at 8:21
    
@thomas michael wallace yes. –  Rob S. Jun 8 '11 at 13:48
    
Check /var/log/syslog to see whether the cron has ran or not. –  Lekensteyn Jun 8 '11 at 14:59

1 Answer 1

up vote 2 down vote accepted

The issue for me ended up being that cron had stopped working and thus even though logwatch was still running it was not emailing me a daily report. I simply restarted cron ( sudo service cron restart ) and it began working working again.

share|improve this answer

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.