cron: clarify split store docs

This commit is contained in:
Gustavo Madeira Santana
2026-04-20 11:49:25 -04:00
parent 6a3f92baef
commit a1db26707d
2 changed files with 5 additions and 1 deletions

View File

@@ -369,6 +369,10 @@ Model override note:
}
```
The runtime state sidecar is derived from `cron.store`: a `.json` store such as
`~/clawd/cron/jobs.json` uses `~/clawd/cron/jobs-state.json`, while a store path
without a `.json` suffix appends `-state.json`.
Disable cron: `cron.enabled: false` or `OPENCLAW_SKIP_CRON=1`.
**One-shot retry**: transient errors (rate limit, overload, network, server error) retry up to 3 times with exponential backoff. Permanent errors disable immediately.

View File

@@ -226,7 +226,7 @@ export async function saveCronStore(
}
}
// Write state file first (safer ordering for migration — see PR_DRAFT.md Atomicity).
// Write state first so migration never leaves stripped config without runtime state.
if (stateChanged || migrating) {
await atomicWrite(statePath, stateJson);
serializedStoreCache.set(stateCacheKey, stateJson);