Hello,
I can confirm it - I rarely open them, because my mailprogram will run
out of resources.
One difference though, I get them once every 24 hour (around midnight).
So I just figured that it was because I had done something bad with my
system :-)
My crontab as it is now:
--- begin
# Global variables
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly
0 * * * * rm -f /var/spool/cron/lastrun/cron.hourly
1 3 * * * rm -f /var/spool/cron/lastrun/cron.daily
15 4 * * 6 rm -f /var/spool/cron/lastrun/cron.weekly
30 5 1 * * rm -f /var/spool/cron/lastrun/cron.monthly
*/10 * * * * test -x /usr/sbin/run-crons && /usr/sbin/run-crons
0 0 * * * /usr/sbin/logwatch.pl >/dev/null 2>&1
0 0 * * * /etc/init.d/ntp-client restart >/dev/null 2>&1
--- end
And I know those two last lines look might weird, I've been too lazy to
change them.. They work.
/Jakob Rosenlund
Alex Efros wrote:
Hi!
On all my servers I receive from time to time (usually once in 5-30 days)
email with subject subj :) and content:
---cut---
find: /var/spool/cron/lastrun/cron.hourly: No such file or directory
---cut---
I suppose this is because of race condition somethere in /usr/sbin/run-crons.
Root's default crontab is:
---cut---
*/15 * * * * test -x /usr/sbin/run-crons && /usr/sbin/run-crons
0 * * * * rm -f /var/spool/cron/lastrun/cron.hourly
0 8 * * * rm -f /var/spool/cron/lastrun/cron.daily
15 11 * * 6 rm -f /var/spool/cron/lastrun/cron.weekly
30 12 1 * * rm -f /var/spool/cron/lastrun/cron.monthly
---cut---
and I think if first two lines from crontab will start at same time and
/usr/sbin/run-crons will check for existence of lastrun/cron.hourly
__BEFORE__ rm will remove it then race condition happens and result in
that email sent to root.
Can anybody confirm this?
If I'm right, then maybe better to change last 4 lines in crontab to not
run in %15 minute:
---cut---
*/15 * * * * test -x /usr/sbin/run-crons && /usr/sbin/run-crons
5 * * * * rm -f /var/spool/cron/lastrun/cron.hourly
5 8 * * * rm -f /var/spool/cron/lastrun/cron.daily
20 11 * * 6 rm -f /var/spool/cron/lastrun/cron.weekly
35 12 1 * * rm -f /var/spool/cron/lastrun/cron.monthly
---cut---
--
[email protected] mailing list