From: thib Date: Sat, 26 Feb 2005 15:11:24 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: ver2_9_6~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d66c7ad772112aa53d1997b12a44007423131bb9;p=fcron *** empty log message *** --- diff --git a/configure.in b/configure.in index 24f2c59..5937119 100644 --- a/configure.in +++ b/configure.in @@ -13,7 +13,7 @@ AC_PREFIX_DEFAULT($prefix) AC_CONFIG_HEADER(config.h) AC_PREREQ(2.57) -vers="2.9.5.1" +vers="2.9.6" vers_quoted="\"$vers\"" AC_DEFINE_UNQUOTED(VERSION, $vers) AC_DEFINE_UNQUOTED(VERSION_QUOTED, $vers_quoted) @@ -1091,8 +1091,8 @@ dnl Info for user dnl --------------------------------------------------------------------- echo -echo "Sum up :" -echo "------" +echo "Summary :" +echo "-------" echo echo -n "run in debug mode by default : " if test "$debug" -eq "1"; then diff --git a/doc/en/changes.sgml b/doc/en/changes.sgml index 98d3883..fd40cb4 100644 --- a/doc/en/changes.sgml +++ b/doc/en/changes.sgml @@ -8,11 +8,35 @@ Foundation. A copy of the license is included in gfdl.sgml. --> - + Changes + + From version 2.9.5.1 to 2.9.6 + + fixed the bug which made jobs run an hour too early after + a daylight saving time change. + Added detailed explanations about when a job will run + when there is a DST change in the FAQ. + + + fixed fcrondyn's "Unknown command" bug on x86_64 + (thanks go to Georgi Georgiev). + + + made fcrontab behave better when there is no space left + in the spool directory (used to truncate the fcrontab source file). + + + Added a script, check_system_crontabs, to emulate Vixie cron's + behavior about /etc/crontab and /etc/cron.d. Please have a look + at the top of script/check_system_crontabs for more information. + + + + From version 2.9.5 to 2.9.5.1 @@ -59,7 +83,7 @@ A copy of the license is included in gfdl.sgml. strerror()). - Fixed a bug which happened on Daylight Time Save change + Fixed a bug which happened on Daylight Saving Time change on some systems. It would make fcron run into a nasty infinite loop. Added a sanity check in set_nextexe() to avoid such things. diff --git a/doc/en/faq.sgml b/doc/en/faq.sgml index 03f77b4..87b5f8d 100644 --- a/doc/en/faq.sgml +++ b/doc/en/faq.sgml @@ -8,7 +8,7 @@ Foundation. A copy of the license is included in gfdl.sgml. --> - + Frequently Asked Questions @@ -18,8 +18,7 @@ practical approach. - How does fcron handle system clock adjustments (daylight -savings, etc) ? + How does fcron handle system clock adjustments ? @@ -50,8 +49,8 @@ during the interval because they are scheduled to run in a past time. As special case is when "@xxx" style scheduling rules are involved, you must consider the "adjustment-interval". The "adjustment-interval" is the time -difference between the original system time and the new system time. If the ... - run at "adjust-interval" too +difference between the original system time and the new system time. The concerned +jobs will run at "adjust-interval" too early or too late depending of the nature of the adjust. To conclude, fcron behaves quite well for small clock adjusts. Each job @@ -61,6 +60,58 @@ a big change in the time and date, you should probably reset all the scheduled "nextexe" by running "fcrontab -z" on all the fcrontabs. + + + How does fcron handle daylight saving time changes ? + + + There are two types of daylight saving time change : +the remove-one-hour change (for instance, "at 3:00, it will be 2:00"), +and the add-one-hour one (for instance, "at 2:00, it will be 3:00"). +In both cases, fcron will run the job only once (more precisely, it won't +run the job twice as many as it should have). + In the first case, the official time changes as follow +(in order of real chronological time) : [x, 2:00] -> i1 : [2:00, 3:00] + -> i2 : [2:00, 3:00] -> [3:00, y]. i1 and i2 are the names of the two +intervals [2:00, 3:00]. For this kind of DST change, a job which should +run between 2:00 and 3:00 will run either in i1 or in i2, but not both. +Consequently, a job scheduled to run every day at 2:30 (for instance) +will be run only once. There is no way for a user to know if the job will +be run in i1 or i2. + In the second case, there is a gap in time : +the official time changes as follow (in order of real chronological time) : +[x, 2:00] -> [3:00, y]. A job scheduled between 2:00 and 3:00 will get +run once, and only once, even if it should have been run several times. +For instance, a job which should have run every 10 minutes will run only +once, not 6 times, between 1:59 and 3:01. A job scheduled to run at +2:xx will run at 3:xx. For instance, if a job is scheduled to run +every day at 2:30, it will run at 3:30 the day of this kind of DST change. + + + + + + What about fcron and software suspend + (aka. suspend to RAM, to disk) ? + + + We suppose here that you are using swsusp and the hibernate + script to do a "suspend to disk", but it should be similar + with other methods. + When you switch on your computer after a suspend to disk, + the system time will be incorrect, and will then be corrected + by the hibernate script. Before it is corrected, fcron may + compute the time and date of the next execution of a job : + the computation would then be incorrect (please see the entry + about system clock adjustment in the present FAQ). + So you should have the hibernate script stop fcron before + the suspend, and then restart it when the system is switched on, + ie. put a line like "RestartServices fcron" in your hibernate.conf + file. That way, the system time will always be correct when + fcron runs (assuming that fcron is started after the system time + is corrected). + + How can I prevent fcrontab from considering the first @@ -257,8 +308,11 @@ and set appropriately the paths : As far as I know, fcron supports completely the syntax of - Vixie cron's crontab. So you should not have any problem with that - (otherwise, please contact me at &email;). + Vixie cron's crontab, excepted the @* syntax (@annually, + @weekly, etc : if you use that, you will have to replace it + with the explicit equivalent given in crontab(5)). So you + should not have much problem with that (otherwise, please + contact me at &email;). The main problem is about the management of the system (f)crontab. Vixie cron monitors the changes on /etc/crontab every minute, and automatically takes into account the changes if any. @@ -273,6 +327,14 @@ and set appropriately the paths : /usr/bin/crontab, and to reinstall the system (f)crontab with fcrontab /etc/crontab each time you modify it (if you find something else to do, please tell me !). + You can also use the script script/check_system_crontabs + to generate a system fcrontab from /etc/(f)crontab and /etc/cron.d/, + and install it automatically. If you choose to do that, take + a look at the beginning of the script : you will find insctructions + on how to use it -- and a few warnings you should pay attention to. + With this script, the behavior of fcron should be very similar + to Vixie cron's one concerning /etc/crontab and /etc/cron.d/. + diff --git a/doc/en/todo.sgml b/doc/en/todo.sgml index f23a45c..1306f73 100644 --- a/doc/en/todo.sgml +++ b/doc/en/todo.sgml @@ -8,7 +8,7 @@ Foundation. A copy of the license is included in gfdl.sgml. --> - + Todo @@ -24,14 +24,15 @@ A copy of the license is included in gfdl.sgml. High priority + + NetBSD : bug from Gabor Z. Papp : fifo file created as fcron.fif instead of fcron.fifo + port to HP-UX : mails from Scott Tinsley : test in autoconf to remove call to "ioctl(fd, TIOCNOTTY, 0);" - - - add something on fcron's incompatibility with Vixie cron @* syntax -- fix that. + bug fix : fcron freezes if the filesystem on which it operates has no space left ? (cannot reproduce it on my linux system) @@ -50,7 +51,9 @@ A copy of the license is included in gfdl.sgml. add a timezone option instead of the tzdiff (so it would - look like !timezone(europe/paris)) (?) + look like !timezone(europe/paris)) (-> cf. tzset() and TZ env var : + set TZ before every set_next_exe(), etc) + For environment settings, make a var substitution. diff --git a/temp_file.c b/temp_file.c index 072d640..e758295 100644 --- a/temp_file.c +++ b/temp_file.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: temp_file.c,v 1.3 2003-12-25 22:51:47 thib Exp $ */ + /* $Id: temp_file.c,v 1.4 2005-02-26 15:15:03 thib Exp $ */ #include "global.h" #include "temp_file.h" @@ -34,6 +34,8 @@ extern char debug_opt; int temp_file(char **name) /* Open a temporary file and return its file descriptor */ + /* Returns the filename to *name if name is not null. */ + /* (die on error) */ { int fd; #ifdef HAVE_MKSTEMP @@ -43,7 +45,7 @@ temp_file(char **name) strcat(name_local, "fcr-XXXXXX"); if ( (fd = mkstemp(name_local)) == -1 ) die_e("Can't find a unique temporary filename"); - /* we must set the file mode to 600 (some version of mkstemp may set it + /* we must set the file mode to 600 (some versions of mkstemp may set it * incorrectly) */ if ( fchmod(fd, S_IWUSR | S_IRUSR) != 0 ) die_e("Can't fchmod temp file");