Skip to content

Scheduled jobs: cron and proactive runs

Maps to: Scheduled jobs: cron.

Scope

Proactive agent work on a schedule: sleep-time compute, monitoring loops, and batch jobs with the same durability and auth as interactive runs.

Design questions

  • Stateful cron on a fixed thread versus stateless fresh thread per execution.
  • Thread cleanup after batch runs and discoverability of historical cron output.
  • Alerting when scheduled runs fail or silently skip.
  • Time zone and daylight-saving behavior for operator-defined schedules.

Tradeoffs

  • Stateful schedules accumulate context but grow checkpoints and privacy scope.
  • Stateless batches simplify isolation but lose narrative continuity.
  • Forgotten crons continue billing and load until explicitly removed.

Evaluation hooks

  • Scheduled run survives transient model outage with retry consistent with interactive runs.
  • Auth and middleware apply identically to cron-triggered runs.
  • Operational runbook for disable and drain.

Reference notes

See LangChain runtime article (cron patterns figure).