Description of problem: Latest vixie-cron in devel looks *very broken* to me: Sep 19 19:50:01 tux CROND[32056]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 19 19:50:01 tux CROND[32056]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 19 19:50:01 tux CROND[32056]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 19 20:01:01 tux CROND[768]: (root) CMD (run-parts /etc/cron.hourly) Sep 19 20:05:01 tux CROND[1326]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 19 20:05:01 tux CROND[1326]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 19 20:05:01 tux CROND[1326]: (vnstat) CMD (/usr/sbin/vnstat.cron) Why the hell is this executed *three* times in the same second? It's just an every 5 minutes cronjob (*/5). So only once per 5 minutes would be enough. Unfortunately the cronjob is NOT executed at 20:00:00 - why? Please fix this broken things as soon as possible. It also looks like my logwatch is no longer executed. Logwatch is installed correctly and "rpm -V logwatch" returns also nothing. As this worked with older versions, something else in vixie-cron must be broken, too. Version-Release number of selected component (if applicable): vixie-cron-4.2-2 How reproducible: Install vixie-cron and vnstat from devel and get some popcorn or cookies when watching to /var/log/cron... ;-) Actual results: Heavily broken vixie-cron. Expected results: Working vixie-cron like in the past (before 4.1-84 or so)
Looks like cron.hourly, cron.daily, cron.monthly etc. don't work, means that they are not executed simply. And the logging behaviour IMHO broke with rsyslog.
No, in my testing cron.{hourly,daily,monthly} do get run - sometimes. I have this in cron.hourly: #!/bin/sh touch /tmp/cron-ok /usr/bin/logger -t crondtest "cron.hourly running OK" exit 0 I have a /tmp/cron-ok file - but it hasn't been touched in 11 hours (since 23:00 last night). The logs are equally strange - I get the log message five times, at 19:00, and not before or since. Further, I installed vnstat, and vnstat runs only at 5 past the hour (instead of every 5 minutes). However, it *does* run 12 times per hour - just 12 times at once!
Okay - figured out why cron.hourly isn't working right. run-parts now has this at the top: # if cron.daily was run today AUX1=`cat /var/spool/anacron/cron.daily` AUX2=`date +%Y%m%d` [ "$AUX1" == $AUX2 ] || exit 0 Which means that run-parts silently fails - for *all* cases (hourly, weekly, etc) - if anacron has run cron.daily today. I completely fail to understand why this code is here. It's anacron's job to figure out if cron.daily has been run already today, not run-parts. Why is that there? Removing those four lines should fix cron.hourly, at least.
As for the log messages - the vnstat cron is definitely being *run* every 5 minutes, but the log messages have the wrong time and pid on them. That may actually be just an rsyslog bug. I'll try to investigate further - maybe testing with a different syslogd would help?
The run-parts thing was introduced between crontabs-1.10-14 and -16.
My vnstat is running every five minutes. I'm working on fix of cron.hourly.
Yes, vnstat is running every five minutes, but logging is broken. As far as I can see, it's not only cron.hourly.
rsyslog has some logging problems. If you run rsyslog with -e it's ok or you can try syslog-ng instead of rsyslog.
*** Bug 303031 has been marked as a duplicate of this bug. ***
Bug 303031 was correctly filed against crontabs - changing component here. I've created a different bug to track the rsyslogd timestamp problem: bug 303341
Fix in crontabs-1.10-18.fc8 and anacron-2.3-56.fc8. Cron.{hourly,daily,...} run correct.