Tom van den Berge wrote: > With the following rule: > > type=Calendar > time=* * * * * > desc=CHECK FOR MESSAGE > action=write - %t > > (every minute, an event is generated) > > The following output is generated: > > Tue Jan 13 15:38:47 2009 > Tue Jan 13 15:39:00 2009 > Tue Jan 13 15:40:00 2009 > etc... > > > The program was started at 15:38:47. With these crontab settings (* * * > * *), the first event is always generated immediately when the program > starts. Subsequent events are generated at exactly 00 seconds every minute. > > I would say that this is not correct; the first event should also be > generated at 00 seconds instead of immediately.
That has been the program behavior since the introduction of the Calendar rule. In order to explain the rationale behind this -- the earlier versions of SEC did not support internal events (SEC_STARTUP, SEC_SHUTDOWN, etc.), so this behavior of Calendar allowed for starting various daemons immediately at SEC startup (or after SIGHUP was received and all SEC child processes were terminated): type=Calendar time=* * * * * context=!DAEMON_RUNNING desc=Start a daemon action=spawn <something>; create DAEMON_RUNNING Also, when speaking strictly, * * * * * means "once in a minute" and execution at the 0th second is not a must. In fact, by changing the default value of the --cleantime option, the end user can easily have a condition where the Calendar action gets executed later than the 0th second. Having this in mind, I thought that it would be wise to execute the Calendar action with the '* * * * *' time pattern at SEC startup, since then the job is done once for the current minute like the definition says. br, risto > > > What do you think? > > Cheers, > Tom > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Simple-evcorr-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users > ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Simple-evcorr-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users
