fix(cron): re-arm timer in finally to survive transient errors (#9948)

This commit is contained in:
Maksym Brashchenko 2026-02-06 04:46:59 +05:00 committed by GitHub
parent 313e2f2e85
commit 40e23b05f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -48,10 +48,11 @@ export async function onTimer(state: CronServiceState) {
await runDueJobs(state);
recomputeNextRuns(state);
await persist(state);
armTimer(state);
});
} finally {
state.running = false;
// Always re-arm so transient errors (e.g. ENOSPC) don't kill the scheduler.
armTimer(state);
}
}