This repository was archived by the owner on Feb 26, 2026. It is now read-only.
Commit 41615a7
committed
fix(scheduler): prevent tasks firing immediately on daemon restart
when recalculateNextRuns() computed nextRun from lastRun and the daemon
restarted after the scheduled window (e.g. morning-briefing at 7 AM,
daemon restarted at 8 PM), nextRun landed in the past and checkAndRun()
would fire the task immediately. now recalculates from 'now' when the
computed nextRun is already past, so time-sensitive tasks are correctly
scheduled for their next future occurrence.1 parent d359b09 commit 41615a7
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
995 | 995 | | |
996 | 996 | | |
997 | 997 | | |
998 | | - | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
999 | 1008 | | |
1000 | 1009 | | |
1001 | 1010 | | |
| |||
0 commit comments