Define a schedule
Create a TypeScript file under an agent’sschedules/ directory. The filename
must match the schedule ID:
weekday-hygiene.ts
timezone is an IANA timezone such
as UTC, America/Los_Angeles, or Europe/London. The dispatch payload must
be JSON-compatible and must not contain secrets.
Development and Production
Whenenabled is omitted, it defaults to ["production"].
- Development displays every deployed schedule and supports Run now. Schedules that do not enable Development are marked Manual only and never recur there.
- Production automatically runs schedules that enable Production.
- Add
"development"toenabledonly when you intentionally want automatic Development recurrence.
Receive scheduled input
Each run starts a fresh session pinned to the deployment that was active when the run was claimed.useInput() includes the static dispatch and execution
metadata:
mode to select business behavior. The platform
sets input.source to "schedule" as provenance, but transport provenance
should not be the agent’s business-mode switch.
After narrowing input.source === "schedule", input.schedule contains the
schedule ID, run ID, intended time, timezone, attempt number, and whether the
run was started manually.
Overlap and run history
overlap defaults to "skip". If an earlier run is still starting or running,
the next occurrence is recorded as skipped. Use "allow" only when concurrent
runs are safe.
The project’s Schedules tab shows the next and previous run, current
activation state, recent outcomes, and linked sessions. Run now uses the
same deployment and dispatch payload as an automatic occurrence.
Schedule timing and payload remain code-owned. Redeploy the project after
changing a definition.