Intermediate9 min
Cron Jobs & Webhooks
Schedule recurring agent runs with cron jobs and receive real-time notifications with webhooks — essential infrastructure for production agent systems.
Quick Reference
- →Cron jobs run agents on a schedule — daily reports, periodic monitoring, memory synthesis
- →Thread-bound crons accumulate state across runs (same thread); stateless crons start fresh each time
- →Webhooks notify your systems when runs complete, stream events, or cron executes
- →Custom webhook headers with env var templating for authentication
- →URL restrictions (domain allowlists, HTTPS enforcement) for webhook security
- →Thread TTL cleanup prevents cron-created threads from accumulating indefinitely
Cron Jobs
| Type | Thread Behavior | State | Best For |
|---|---|---|---|
| Thread-bound | Same thread every run | Accumulates across runs | Daily briefings, monitoring with memory |
| Stateless | New thread each run | Fresh each time | Batch processing, cleanup tasks |
Creating cron jobs via SDK