An OpenClaw recurring cron job starts failing every night — what does the scheduler do on its own, and how do you find out?
answer
- back off before the next try
- alert after a short streak
- one incident, one recovery notice
- auto-disable after ten in a row
- the default list hides disabled jobs
basics
~20 sRecurring failures back off (30s, 1m, 5m, 15m, 60m) until a success. A job with an alert route alerts after 2 consecutive failures with a 1-hour cooldown, and after 10 consecutive failures the scheduler auto-disables it and notifies the owning agent.
solid answer
~50 sEach consecutive execution error pushes the next attempt back on a 30 s, 1 min, 5 min, 15 min, 60 min schedule, and a success resets it. If the job has somewhere to report, a `failureAlert` route, a `delivery.failureDestination` or simply its announce target, it sends an alert after 2 consecutive failures with a 1-hour cooldown; repeated failures with the same cause stay one incident, and the first success sends one recovery notice. A job with no such route stays quiet unless you configure `failureAlert`. After 10 consecutive failures a `cron` or `every` job is auto-disabled, with `state.autoDisabled.reason` recorded and a notification to the owning agent. Disabled jobs drop out of `openclaw cron list`, so use `--all`, read `openclaw cron runs <jobId> --status error`, fix the cause, then `openclaw cron enable <jobId>`, which clears the streaks. Delivery-only failures do not count toward this streak.
go deeper
Recall that a failing recurring job backs off, can alert after a couple of failures, and is disabled after ten in a row.
Explain the backoff steps, which outcomes count as execution errors, and why delivery-only failures and skips are tracked separately.
Show the operating routine: give important jobs a failure route, use list --all and runs --status error, fix the cause, then enable to clear the streak.
Decide which jobs warrant a dedicated failure destination and who owns the alerts, since a job with no route can fail quietly until auto-disable.
## What counts as a failure OpenClaw's scheduler records each run with an execution `status` (`ok`, `error` or `skipped`) and a whole-run `completionStatus`. Only **execution errors** drive retries and the failure streak: - **Counts:** a model or provider failure (even with no reply), a structured exec denial, a command payload that exits non-zero, is killed by a signal or times out, a script that throws or exhausts its tool budget. - **Does not count:** a delivery-only failure (`status: "ok"` with `completionStatus: "failed"`), and skipped runs, such as a local Ollama endpoint found unreachable before the run, which keep their own separate counter. Runs also have a wall-clock budget: `--timeout-seconds` when set, otherwise isolated agent-turn jobs are bounded by the scheduler's 60-minute watchdog, command jobs by 10 minutes and script payloads by 5 minutes. ## Backoff After consecutive execution errors, a recurring job waits longer before its next attempt: | Consecutive errors | Next attempt after | |---|---| | 1 | 30 s | | 2 | 1 min | | 3 | 5 min | | 4 | 15 min | | 5 or more | 60 min | The next successful run resets the schedule. One-shot `--at` jobs differ: transient errors (rate limit, overload, network, timeout, server error) retry on a built-in schedule, while permanent errors disable the job at once. ## Failure alerts - **Who is covered by default.** A job that already has a route, meaning a resolved failure destination or its primary announce target, alerts after **2 consecutive failures** with a **1-hour cooldown**. Jobs with no route stay silent unless a per-job or global `failureAlert` object turns the policy on. - **Route order.** The job's own `failureAlert` route fields come first, then `delivery.failureDestination` layered over global `cron.failureAlert`, then the primary announce target. - **Incidents.** Repeated failures with the same cause form one incident and do not re-alert, even across restarts; a changed cause can alert again after the cooldown. The first success sends a single recovery notice. - **Opting out.** `failureAlert: false` on a job silences its alerts but not the auto-disable notice; `delivery.bestEffort: true` suppresses inherited default alerts. - **Tuning.** `openclaw cron edit` exposes `--failure-alert-after`, `--failure-alert-cooldown`, `--failure-alert-channel`, `--failure-alert-to` and related flags. ## The auto-disable backstop Whatever the alert settings, a time-based recurring job (`cron` or `every`) is **auto-disabled after 10 consecutive execution failures**, and after 3 schedule-computation errors. The job records `state.autoDisabled.reason` (`consecutive-failures` or `schedule-errors`), and the owning agent gets a notification with a safe cause and the recovery command. Raw errors stay in run history. ## Investigating 1. `openclaw cron list --all`: the default list hides disabled jobs, so an auto-disabled job seems to vanish. 2. `openclaw cron show <jobId>`: current state, last error and delivery route. 3. `openclaw cron runs <jobId> --status error --limit 20`: the failing runs, with summaries and errors; `--query timeout` narrows further. 4. `openclaw logs --follow` during a forced run (`openclaw cron run <jobId> --wait`), which exits non-zero unless the run completes successfully. 5. Fix the cause (a retired model, a credential, a script bug), then `openclaw cron enable <jobId>`, which clears the recorded reason and failure streaks. ## How long the evidence lasts - Terminal run history is retained for **7 days** (rows for lost runs for 24 hours), with the newest 2000 rows per job as an extra ceiling, so investigate a nightly failure within the week. - `cron.sessionRetention` (default `24h`) prunes finished isolated run sessions, which removes their transcripts sooner than the run rows. - Auto-disable notices keep raw errors out of chat; the full error stays in run history, and the Control UI's **View transcript** opens a run's recorded conversation while it is retained. ## Why this matters for an unattended assistant A scheduled job runs while nobody watches. Backoff stops a broken job from hammering a model provider every minute, the alert makes the first two failures visible, and auto-disable stops ten failures from becoming a hundred. The gap to watch is a job with **no route**: it can fail quietly until auto-disable, so give important jobs a failure destination. Grouping recurring failure alerts into incidents arrived in 2026.9.5, so older installs may alert more often.
- Why does a failed Slack send not push an OpenClaw job toward auto-disable?Delivery is tracked separately from execution. A run whose payload succeeded but whose required delivery failed records `status: "ok"` with `completionStatus: "failed"`; it does not increment the execution-failure streak or trigger backoff. It can still raise a delivery-failure alert through a resolved failure destination, grouped into one incident and subject to the shared cooldown.
- An OpenClaw job's model was retired by its provider. What does the failure look like, and what fixes it?The provider's rejection is recorded as `model_not_found` in the job state and run history, and the failure notice points to `openclaw doctor --fix`. Doctor replaces the job's model override with the provider's declared successor when the agent's model policy allows it, or clears the override so the job inherits the agent default. You can also change or remove the override with `openclaw cron edit <jobId> --model ...` or `--clear-model`.
- A failing OpenClaw job retries every minute forever until someone notices.
- Every failing job alerts somewhere even with no route or failureAlert configured.
- Auto-disabling a job deletes it along with its run history.
- A failed Slack send counts toward the auto-disable streak.
- Re-enabling an auto-disabled job keeps its old streak, so one more error disables it again.
Assumes OpenClaw 2026.9.9; grouping of recurring failure alerts into incidents arrived in 2026.9.5, so older releases alert differently.