Scheduling & Crons
Sessions are stateful only while active. If you ask your agent to work on something and close the chat, it doesn't keep going. There's no background daemon thinking about your problem.
How Autonomous Work Happens
Gateway crons spin up independent agent sessions on a schedule, do their work, and optionally report results:
jsonc
// Morning briefing: runs at 8 AM, sends summary to your chat
{
"schedule": { "kind": "cron", "expr": "0 8 * * *", "tz": "America/New_York" },
"sessionTarget": "isolated",
"payload": {
"kind": "agentTurn",
"message": "Check email, calendar, and pending tasks. Send a morning summary."
},
"delivery": { "mode": "announce" }
}The Key Lesson
A script without a cron is a tool, not automation. In one production setup, an entire task operator was built and never scheduled — hours of work that sat idle until it was wired to a cron.
Every automation project needs two answers:
- What does it do? (the script/prompt)
- When does it run? (the schedule)
Three Scheduling Systems
Not everything needs an LLM. Choosing the right tool saves real money:
| System | Cost | Best for |
|---|---|---|
| Gateway crons | Full LLM call per run | Tasks needing AI reasoning (briefings, analysis) |
| Sentinel watchers | LLM only on trigger | Monitoring (price alerts, API health, chain events) |
| Native scheduler | Zero (no LLM) | Non-AI tasks (git sync, backups, data collection) |
For deep coverage of all three systems, see Scheduling & Automation.