fix(cron): add retry policy for one-shot jobs on transient errors (#24355) (openclaw#24435) thanks @hugenshen

Verified:
- pnpm install --frozen-lockfile
- pnpm check
- pnpm test -- --run src/cron/service.issue-regressions.test.ts src/config/config-misc.test.ts

Co-authored-by: hugenshen <16300669+hugenshen@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
NIO
2026-03-01 20:58:03 +08:00
committed by GitHub
parent 62a7683ce6
commit ea3955cd78
10 changed files with 406 additions and 23 deletions

View File

@@ -193,6 +193,19 @@ describe("cron webhook schema", () => {
expect(res.success).toBe(false);
});
it("accepts cron.retry config", () => {
const res = OpenClawSchema.safeParse({
cron: {
retry: {
maxAttempts: 5,
backoffMs: [60000, 120000, 300000],
retryOn: ["rate_limit", "network"],
},
},
});
expect(res.success).toBe(true);
});
});
describe("broadcast", () => {