Surfaces

Cron jobs

Schedule recurring prompts for your AI agent and let the gateway run them unattended on a cron schedule.

Source: crates/gray/src/cron

Cron jobs are stored prompts with a schedule. The agent can create them itself by running gray cron add through bash. Jobs fire when something ticks the store: the gateway daemon, gray cron serve, a gray cron tick host (system cron or a systemd timer), or an open REPL. An inflight guard makes sure a slow run never overlaps its own next trigger.

gray cron add "0 9 * * *" "summarize yesterday's commits"
gray cron add "every 30m" "check the deploy"
gray cron list
gray cron remove <id>

Schedules accept a one-shot "in 10m" or an RFC 3339 timestamp, an interval like "every 1h" or "30m", or a 5-field cron expression. The shortest honored period is 60 seconds.