Managing Cron Jobs with the OpenClaw CLI
Ever had a scheduled task fail silently, leaving you to dig through logs for hours? Or maybe you’ve struggled with timezone offsets that turn a simple morning brief into a midnight surprise.
Managing cron jobs should be straightforward, not a guessing game. The openclaw cron command helps you manage jobs for the Gateway scheduler. You can always run openclaw cron --help to see the full command surface.
Here are a few things you should know about how it works:
- Isolated
cron addjobs use--announcedelivery by default. If you want to keep the output internal, use--no-deliver. Note that--deliveris now a deprecated alias for--announce. - One-shot jobs created with
--atare deleted after they succeed. If you want to keep them around, use the--keep-after-runflag. - For one-shot CLI jobs, if you don’t provide an offset with
--at, the time is treated as UTC. You can use--tz <iana>to specify a local timezone. - If a recurring job fails, it uses an exponential retry backoff (30s → 1m → 5m → 15m → 60m). It returns to the normal schedule after the next successful run.
- When you use
openclaw cron run, it returns as soon as the manual run is queued. Successful responses include{ ok: true, enqueued: true, runId }. You can follow the outcome usingopenclaw cron runs --id <job-id>. - You can manage data retention in your config with
cron.sessionRetention(defaults to24h) andcron.runLog.maxBytesorcron.runLog.keepLines. - If you have older cron jobs, run
openclaw doctor --fixto update them. This command normalizes legacy fields likejobId,schedule.cron, and delivery settings. It also migrates simple webhook fallback jobs to explicit webhook delivery ifcron.webhookis set up.
Common edits
Section titled “Common edits”Update delivery settings without changing the message:
openclaw cron edit <job-id> --announce --channel telegram --to "123456789"Disable delivery for an isolated job:
openclaw cron edit <job-id> --no-deliverEnable lightweight bootstrap context for an isolated job:
openclaw cron edit <job-id> --light-contextAnnounce to a specific channel:
openclaw cron edit <job-id> --announce --channel slack --to "channel:C1234567890"Create an isolated job with lightweight bootstrap context:
openclaw cron add \ --name "Lightweight morning brief" \ --cron "0 7 * * *" \ --session isolated \ --message "Summarize overnight updates." \ --light-context \ --no-deliveropenclaw cron add
—name “Lightweight morning brief”
—cron “0 7 * * *”
—session isolated
—message “Summarize overnight updates.”
—light-context
—no-deliver
OpenClaw Expert
Still stuck?
If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.