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: