Skip to navigation

Schedule recurring work

Append queued input to an existing session at a fixed interval between 60 seconds and 30 days, and pause, resume, or remove the schedule.
View as Markdown

A schedule appends recurring queued input to an existing session. Create the session first, then choose an interval in seconds.

ConstraintValue
Interval60 seconds through 30 days
Cron expressionsNot accepted
Calendar time zonesNot accepted
Register or changeruns:create
Listruns:read

Create a schedule

schedule = client.run_schedules.create_schedule(
project,
session_id=session_id,
interval_seconds=3600,
input={"text": "Review new cases and summarize changes."},
idempotency_key="hourly-case-review",
)["schedule"]

Keep schedule["id"] to control the schedule.

  • Scheduled input joins the session’s queue instead of steering its active turn.
  • Runs still use the agent, permissions, and runtime admission rules for the session.
  • A scheduler delay does not imply that every missed interval will be replayed.

Pause, resume, or remove

schedules = client.run_schedules.list_schedules(project, session_id=session_id)
client.run_schedules.pause_schedule(project, schedule["id"], paused=True)
# Later, when recurring work should resume:
client.run_schedules.pause_schedule(project, schedule["id"], paused=False)

Call delete_schedule(project, schedule_id) when recurring admission should end.

Pausing or removing a schedule does not cancel runs already admitted. Cancel those runs separately if needed.

Preserve the creation idempotency key across uncertain acknowledgements and do not reuse it for different input. Inspect session turns and run events to verify actual execution; a schedule receipt only confirms registration.

Discover CLI equivalents with sikaru run-schedules --help.

Next steps