Reach out

Cron

Brigade can do work on a schedule even when no one is watching. Jobs run inside the gateway, survive restarts, and can fire on a cron expression, a fixed interval, or a single future timestamp.

Three ways to schedule#

Pick exactly one of these per job:

  • --cron "0 9 * * *" — a cron expression. Pair it with an IANA --tz.
  • --every — a fixed interval.
  • --at "2026-06-04T09:00:00+05:30" — a one-shot timestamp.
terminal
$ brigade cron add --cron "0 9 * * *" --tz "Asia/Kolkata" --message "good morning"$ brigade cron add --at "2026-06-04T09:00:00+05:30" --message "stand-up reminder"

What a job does#

A job's payload can be any of:

  • A system event into your main session (--message) — like a nudge you would have typed.
  • A full agent turn in an isolated session (--model, --tools, --light-context).
  • An optional delivery target (--channel, --to) so the result lands in a channel.

Cron supports stagger so a burst of jobs does not all fire on the same tick, and each job records a per-run log you can inspect.

Managing jobs#

terminal
$ brigade cron list$ brigade cron status$ brigade cron runs <jobId>        # per-job run history$ brigade cron run <jobId>         # fire it now$ brigade cron enable <jobId>      # / disable / rm <jobId>$ brigade cron edit <jobId>

Heartbeat#

Cron fires discrete jobs; the heartbeat is the other half of always-on. Driven by a workspace HEARTBEAT.md, it wakes an agent on a regular interval to drain any queued events and do periodic work. Each wake is gated: it honours a global enable flag, yields if your main turn or the session is already busy, and — except on a plain interval tick — skips when there is nothing pending. An interval wake proceeds even with an empty inbox, so the agent can do scheduled work without an incoming message.

Jobs need the gateway

Cron jobs and heartbeats run in the long-lived gateway process. Keep it running with brigade gateway run, or install it as an OS service so it starts at login — see The gateway.