Xymon Mailing List Archive search

tasks.cfg - strange CRONDATE behaviour

list Andy Smith
Tue, 03 Jun 2014 07:30:03 +0100
Message-Id: <user-0657f0723b32@xymon.invalid>

Jeremy Laidman wrote:
On Tuesday, 3 June 2014, Jeremy Laidman <user-71895fb2e44c@xymon.invalid <mailto:user-71895fb2e44c@xymon.invalid>> wrote:

    Interesting.  Does this only happen when the run timestamp is on or
    near the start of each minute?  I'm testing this now, with a
    CRONDATE specification of "*/2 * * * *" (to run every 2 minutes) but
    I'm not seeing the same behaviour - it runs only once every 2
    minutes.  I might have to wait until the run time drifts towards the
    start of the minute to see the same thing as you. 

Yep, when it drifted to 2 seconds after the minute mark I started seeing my script run twice.  When 3 seconds after the minute, it only runs once.  Although on one occasion when at 2 seconds past the minute, it only ran once.

Tue Jun 3 15:48:03 EST 2014
Tue Jun 3 15:50:02 EST 2014
Tue Jun 3 15:50:59 EST 2014
Tue Jun 3 15:52:03 EST 2014
Tue Jun 3 15:54:02 EST 2014
Tue Jun 3 15:54:58 EST 2014
Tue Jun 3 15:56:03 EST 2014
Tue Jun 3 15:58:02 EST 2014
Tue Jun 3 16:00:00 EST 2014
Tue Jun 3 16:00:57 EST 2014
Tue Jun 3 16:02:02 EST 2014
Tue Jun 3 16:04:00 EST 2014
Tue Jun 3 16:04:57 EST 2014
Tue Jun 3 16:06:00 EST 2014
Tue Jun 3 16:06:58 EST 2014

etc.
Just to confirm, with a sleep in the script, my tasks ran only once.  It is not a solution I want to stick with going forward but I havent had time to look at the code yet to see why this might be happening.
-- 
Andy