[Bug 1080490] New: /usr/lib/cron/run-crons miscalculates cron.daily triggers
http://bugzilla.opensuse.org/show_bug.cgi?id=1080490 Bug ID: 1080490 Summary: /usr/lib/cron/run-crons miscalculates cron.daily triggers Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: Stromeko@NexGo.DE QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- The part of the script that tries to figure out if it should run the cron.daily scripts miscalculates the condition for find. Instead of finding scripts that were not run yet today, it looks for scripts that were not run in the last 24 hours. If for whatever reason your cron.daily was run 23:59 yesterday, it will not run today. The correct way to deal with this is to either calculate how many minutes we are into the current day and run anything older than that again (similar to what cron.monthly is doing) or drop a cookie with 'touch -d "today 0:00" cookie' and run if not newer than that (TIME="-not -newer cookie"). Making that safe using mkstemp is left as an exercise for the reader. The cron.weekly section suffers from the same problem, but it's probably hard to notice. The cron.monthly section would probably get easier with the cookie file method as well. It is currently also making the mistake of dragging the current time of day into the result. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1080490
http://bugzilla.opensuse.org/show_bug.cgi?id=1080490#c1
--- Comment #1 from Achim Gratz
http://bugzilla.opensuse.org/show_bug.cgi?id=1080490
http://bugzilla.opensuse.org/show_bug.cgi?id=1080490#c2
--- Comment #2 from Achim Gratz
http://bugzilla.opensuse.org/show_bug.cgi?id=1080490
http://bugzilla.opensuse.org/show_bug.cgi?id=1080490#c3
--- Comment #3 from Achim Gratz
http://bugzilla.opensuse.org/show_bug.cgi?id=1080490
http://bugzilla.opensuse.org/show_bug.cgi?id=1080490#c5
--- Comment #5 from Achim Gratz
Created attachment 792240 [details] proposed patch
So here's what I've been using for almost a year now in the hope that it'll get things finally moving towards fixing the problem.
Can this be fixed? I'm getting tired of having to re-patch the file each time an update changes it back to the buggy version. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1080490
http://bugzilla.opensuse.org/show_bug.cgi?id=1080490#c6
--- Comment #6 from Achim Gratz
Can this be fixed? I'm getting tired of having to re-patch the file each time an update changes it back to the buggy version.
Ping? -- You are receiving this mail because: You are on the CC list for the bug.
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com