Cron: preserve due jobs after manual runs (#23994)

This commit is contained in:
Tak Hoffman
2026-02-22 19:02:05 -06:00
committed by GitHub
parent bac26b4472
commit f6c2e99f5d
2 changed files with 44 additions and 1 deletions

View File

@@ -297,7 +297,10 @@ export async function run(state: CronServiceState, id: string, mode?: "due" | "f
emit(state, { jobId: job.id, action: "removed" });
}
recomputeNextRuns(state);
// Manual runs should not advance other due jobs without executing them.
// Use maintenance-only recompute to repair missing values while
// preserving existing past-due nextRunAtMs entries for future timer ticks.
recomputeNextRunsForMaintenance(state);
await persist(state);
armTimer(state);
});