Why your scheduler can miss a run and never log it — and how to fix it
A developer running a daily automated agent discovered that two runs in August executed roughly 12 hours late, yet the system's log showed a perfect, unbroken sequence with no indication of any missed slots. The root cause is structural: a log can only record runs that actually happened, so a skipped run leaves no entry and no author to write one. Detecting missed runs therefore requires comparing actual run timestamps against an expected schedule — information that lives outside the log itself. A common fix using millisecond arithmetic fails around daylight saving time transitions, where a day is not exactly 86,400,000 milliseconds, causing the monitor to silently under-report missed runs. The correct approach is to enumerate real local calendar days and calculate the precise UTC instant of each expected slot using the Intl API, which handles timezone rules natively without extra dependencies.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in