Skip to content

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 add jobs use --announce delivery by default. If you want to keep the output internal, use --no-deliver. Note that --deliver is now a deprecated alias for --announce.
  • One-shot jobs created with --at are deleted after they succeed. If you want to keep them around, use the --keep-after-run flag.
  • 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 using openclaw cron runs --id <job-id>.
  • You can manage data retention in your config with cron.sessionRetention (defaults to 24h) and cron.runLog.maxBytes or cron.runLog.keepLines.
  • If you have older cron jobs, run openclaw doctor --fix to update them. This command normalizes legacy fields like jobId, schedule.cron, and delivery settings. It also migrates simple webhook fallback jobs to explicit webhook delivery if cron.webhook is set up.

Update delivery settings without changing the message:

Terminal window
openclaw cron edit <job-id> --announce --channel telegram --to "123456789"

Disable delivery for an isolated job:

Terminal window
openclaw cron edit <job-id> --no-deliver

Enable lightweight bootstrap context for an isolated job:

Terminal window
openclaw cron edit <job-id> --light-context

Announce to a specific channel:

Terminal window
openclaw cron edit <job-id> --announce --channel slack --to "channel:C1234567890"

Create an isolated job with lightweight bootstrap context:

Terminal window
openclaw cron add \
--name "Lightweight morning brief" \
--cron "0 7 * * *" \
--session isolated \
--message "Summarize overnight updates." \
--light-context \
--no-deliver

openclaw cron add
—name “Lightweight morning brief”
—cron “0 7 * * *”
—session isolated
—message “Summarize overnight updates.”
—light-context
—no-deliver

OpenClaw

OpenClaw Expert

Still stuck?

If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.