Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 197758

Summary: sys-process/cronbase - cron scripts to run multiple times on DST switch
Product: Gentoo Linux Reporter: Alexander Zubkov <zubkov318>
Component: [OLD] Core systemAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Alexander Zubkov 2007-11-01 11:49:13 UTC
Pre-history:
sys-process/cronbase-0.3.2-r1
sys-process/vixie-cron-4.1-r10
/etc/crontab unmodified.

I have found today, that cron.monthly scripts were run twice.
As I mentioned, this was like this:
4:40 run-crons found that /var/spool/cron/lastrun/cron.monthly was created more than 44645 minutes (31 days, 5 min) ago, deletes it. And then it creates this file again and runs cron.monthly scripts, of course.
5:30 cron runs command "rm -f /var/spool/cron/lastrun/cron.monthly", then run-crons is run, found that /var/spool/cron/lastrun/cron.monthly file is missing, creates it and runs cron.monthly

Situation at 4:40 happens because last month one of the days was 1 hour longer (switch between summer and winter time). And check of creation time more than 31 days, 5 min performed 1 hour earlier than it should. I think the same problem should be with other periodic scripts.
Also, I think this can potentially lead to some security problems or like.

As a wokaround (or solution?) checks can be shifted by 1 hour
daily: 1 day, 5 min -> 1 day, 1 hour, 5 min
weekly: 1 week, 5 min -> 1 week, 1 hour, 5 min
monthly: 31 days, 5 min -> 31 days, 1 hour, 5 min
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-11-01 11:54:51 UTC

*** This bug has been marked as a duplicate of bug 69777 ***