0

My logwatch is configured correctly and is working correctly when I issue manually

/usr/sbin/logwatch

I added it to root's crontab and it is listed correctly when I make crontab -l which gives:

0 5 * * * /etc/cron.daily/0logwatch
0 2 * * * /usr/sbin/logwatch
0 3 * * * /etc/cron.daily/one_of_my_scripts
0 4 * * * /etc/cron.daily/another_script

My scripts work great but logwatch is not working although I added it twice in crontab using a direct call and using the script that is prepared to be run from cron.daily

/var/log/cron seams not to log per-user crontab activities

Any clues?

mmonem
  • 209
  • 1
  • 2
  • 9
  • You realize that there is > 1 location where these type of service crons are located right? Have you checked these as well? – mdpc May 08 '14 at 04:27
  • Sorry, I can't get your point. – mmonem May 08 '14 at 08:49
  • Work your way through http://serverfault.com/questions/449651/why-is-my-crontab-not-working-and-how-can-i-troubleshoot-it it will help you gather information that will either solve your problem or help us help you. – user9517 May 08 '14 at 09:47
  • Thank you. I followed the link and set the MAITO variable and knew where the problem comes from. sendmail is under /usr/sbin which is not enabled by default for crontab entries – mmonem May 09 '14 at 04:08

1 Answers1

0

I followed @lain's link (thanks @lain), set the MAILTO variable, waited for the report email which let me know that the problem comes from sendmail which is located is under /usr/sbin which is not enabled by default for crontab entries. I just adjusted the PATH and everything is alright

mmonem
  • 209
  • 1
  • 2
  • 9