Bug 296741
Summary: | anacron + crontabs 1.10-17.fc8: run-parts doesn't execute all cronjobs | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Robert Scheck <redhat-bugzilla> |
Component: | crontabs | Assignee: | Marcela Mašláňová <mmaslano> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | low | ||
Version: | rawhide | CC: | h1k6zn2m, wwoods |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2007-09-25 08:56:11 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 235703, 257221 |
Description
Robert Scheck
2007-09-19 18:11:43 UTC
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. |