From: Thibault Godouet Date: Mon, 25 Feb 2002 18:43:54 +0000 (+0000) Subject: added -l and -y support X-Git-Tag: ver2_9_4~188 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ce22501b84d9b5da8a374760256452d0815ab75;p=thirdparty%2Ffcron.git added -l and -y support --- diff --git a/database.c b/database.c index 9ab46fc..f3aedbd 100644 --- a/database.c +++ b/database.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: database.c,v 1.61 2002-02-02 14:52:29 thib Exp $ */ + /* $Id: database.c,v 1.62 2002-02-25 18:43:54 thib Exp $ */ #include "fcron.h" @@ -811,10 +811,14 @@ set_next_exe(CL *line, char option) ftime.tm_isdst = -1; - /* to prevent multiple execution in the same minute */ - ftime.tm_min += 1; - ftime.tm_sec = 0; - if (line->cl_runfreq==1 && option != NO_GOTO && option != NO_GOTO_LOG) + /* to prevent multiple execution of &-jobs in the same minute + * (but not if the user has explicitely asked to run jobs immediately) */ + if (first_sleep > 0 || option == STD || line->cl_runfreq != 1) { + ftime.tm_min += 1; + ftime.tm_sec = 0; + } + + if (line->cl_runfreq == 1 && option != NO_GOTO && option != NO_GOTO_LOG) goto_non_matching(line, &ftime, STD); setMonth: