Schedule a task
set_scheduleCreate or update (by name) a scheduled run of the agent. Provide EXACTLY ONE cadence form: cadence (frequency-based), every+period (interval), cron_expression, or run_at (one-shot). AGENT mode uses instruction; TOOL mode uses action_tool+action_params (fires one tool deterministically).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Stable per-agent schedule name — reusing a name updates that schedule in place. | |
| every | No | Interval count (used with `period`), e.g. 6. | |
| period | No | Interval unit (used with `every`). | |
| run_at | No | ISO-8601 datetime for a one-shot run (future, within ~366 days). | |
| cadence | No | Frequency form: {frequency: hourly|daily|weekly|monthly, at: 'HH:MM', weekday?: mon..sun, day_of_month?: 1-28}. | |
| context | No | Optional context object made available to each run. | |
| agent_id | Yes | Target agent's id (from list_agents / create_agent / get_catalog view=agents). | |
| max_runs | No | Optional cap on the number of runs. | |
| timezone | No | IANA timezone for cron/one-shot. Defaults to the org timezone, else UTC. | |
| expires_at | No | ISO-8601 datetime after which the schedule stops. | |
| action_tool | No | A single tool name to fire deterministically each run (TOOL mode). Clears instruction. | |
| instruction | No | What the agent should do each run (AGENT mode). Omit if using action_tool. | |
| thread_mode | No | Conversation thread handling per run. | |
| action_params | No | Keyword arguments passed to action_tool at fire time. | |
| cron_expression | No | 5-field cron expression, interpreted in `timezone`. |