mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 19:44:30 +00:00
fix(cron): re-arm timer in finally to survive transient errors (#9948)
This commit is contained in:
committed by
GitHub
parent
313e2f2e85
commit
40e23b05f7
@@ -48,10 +48,11 @@ export async function onTimer(state: CronServiceState) {
|
|||||||
await runDueJobs(state);
|
await runDueJobs(state);
|
||||||
recomputeNextRuns(state);
|
recomputeNextRuns(state);
|
||||||
await persist(state);
|
await persist(state);
|
||||||
armTimer(state);
|
|
||||||
});
|
});
|
||||||
} finally {
|
} finally {
|
||||||
state.running = false;
|
state.running = false;
|
||||||
|
// Always re-arm so transient errors (e.g. ENOSPC) don't kill the scheduler.
|
||||||
|
armTimer(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user