Production & Scale/Production Operations
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

TypeThread BehaviorStateBest For
Thread-boundSame thread every runAccumulates across runsDaily briefings, monitoring with memory
StatelessNew thread each runFresh each timeBatch processing, cleanup tasks
Creating cron jobs via SDK