[Bug 243020] New: cron reloads config too late
https://bugzilla.novell.com/show_bug.cgi?id=243020 Summary: cron reloads config too late Product: SUSE Linux 10.1 Version: Final Platform: Other OS/Version: SuSE Linux 10.1 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: A.M.Iwi@rl.ac.uk QAContact: qa@suse.de If you edit a crontab file so that a cron job will run during the following minute, it does not run, because at the next minute the daemon will run jobs scheduled for that minute that it already knew about, and only reread the config after launching any jobs. e.g. if you edit crontab at 00:00:30, and add a job to run at 00:01 then it won't run, although you can add a job to run at 00:02 and it will. This is a bit of a nuisance when testing cron jobs. Looking at the source code, there is a call to load_database() at the end of the infinite loop in main() in cron.c. I haven't tried it, but it seems reasonably obvious that if that call was moved to just after the "while" loop which has the comment "wait for the time (in minutes) to change", then it would solve this problem. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=243020 ------- Comment #1 from A.M.Iwi@rl.ac.uk 2007-02-07 03:50 MST ------- I mean like this... --- vixie-cron-4.1/cron.c~ 2004-07-21 14:31:55.000000000 +0100 +++ vixie-cron-4.1/cron.c 2007-02-07 10:48:12.000000000 +0000 @@ -156,6 +156,8 @@ } while (clockTime == timeRunning); timeRunning = clockTime; + load_database(&database); + /* * Calculate how the current time differs from our virtual * clock. Classify the change into one of 4 cases. @@ -261,7 +263,6 @@ got_sigchld = 0; sigchld_reaper(); } - load_database(&database); } } -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=243020 mhorvath@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |mkoenig@novell.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=243020 mkoenig@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED Info Provider|mkoenig@novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=243020 mkoenig@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team- |mkoenig@novell.com |screening@forge.provo.novell| |.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=243020 mkoenig@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED ------- Comment #2 from mkoenig@novell.com 2007-02-12 09:43 MST ------- Yes, looks reasonable. Fixed in stable. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
participants (1)
-
bugzilla_noreply@novell.com