Files
bot/docs/cli/cron.md
zeekayandHanzo Dev 84e4069c2c docs name the state dir and config file the bot reads: ~/.bot/bot.json
The docs said ~/.hanzo-bot/hanzo-bot.json (and ~/.hanzo-bot-<profile>, hanzo-bot.plugin.json), which nothing reads: src/config/paths.ts resolves ~/.bot, bot.json and ~/.bot-<profile>, and plugins ship bot.plugin.json. Every such path in docs/ now names what the code opens.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-24 21:12:09 -07:00

2.0 KiB
Raw Permalink Blame History

summary, read_when, title
summary read_when title
CLI reference for `hanzo-bot cron` (schedule and run background jobs)
You want scheduled jobs and wakeups
You’re debugging cron execution and logs
cron

hanzo-bot cron

Manage cron jobs for the Gateway scheduler.

Related:

Tip: run hanzo-bot cron --help for the full command surface.

Note: isolated cron add jobs default to --announce delivery. Use --no-deliver to keep output internal. --deliver remains as a deprecated alias for --announce.

Note: one-shot (--at) jobs delete after success by default. Use --keep-after-run to keep them.

Note: recurring jobs now use exponential retry backoff after consecutive errors (30s → 1m → 5m → 15m → 60m), then return to normal schedule after the next successful run.

Note: retention/pruning is controlled in config:

  • cron.sessionRetention (default 24h) prunes completed isolated run sessions.
  • cron.runLog.maxBytes + cron.runLog.keepLines prune ~/.bot/cron/runs/<jobId>.jsonl.

Common edits

Update delivery settings without changing the message:

hanzo-bot cron edit <job-id> --announce --channel telegram --to "123456789"

Disable delivery for an isolated job:

hanzo-bot cron edit <job-id> --no-deliver

Enable lightweight bootstrap context for an isolated job:

hanzo-bot cron edit <job-id> --light-context

Announce to a specific channel:

hanzo-bot cron edit <job-id> --announce --channel slack --to "channel:C1234567890"

Create an isolated job with lightweight bootstrap context:

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

--light-context applies to isolated agent-turn jobs only. For cron runs, lightweight mode keeps bootstrap context empty instead of injecting the full workspace bootstrap set.