Skip to content
Go To Dashboard

Schedule an agent

A schedule is a persisted cloud trigger attached to one deployed agent by its slug. Each occurrence starts an independent production run with the input object stored on the schedule. Creating, reading, previewing, and cancelling schedules all use the authenticated Agents API.

Before scheduling, deploy the agent and confirm it has a ready build. The API can retain a trigger independently of a build, but a fire cannot start a runnable agent without one.

Preview validates the cron expression and IANA timezone and projects upcoming occurrences. It creates no trigger, but it still requires authentication because it is served by the tenant Agents API.

Ask Claude to call sapiom_dev_agents_cron_preview:

{
"cron": "0 9 * * 1-5",
"timezone": "America/Los_Angeles",
"count": 3
}

The response echoes the cron and timezone and returns occurrences as ISO 8601 instants in UTC. Preview does not apply a schedule’s optional start/end bounds or jitter.

Call sapiom_dev_agents_schedule with the deployed definition slug:

{
"definition": "daily-research-brief",
"kind": "schedule_cron",
"cron": "0 9 * * 1-5",
"timezone": "America/Los_Angeles",
"input": { "topic": "agent reliability" },
"policy": { "catchupPolicy": "skip", "overlapPolicy": "allow" }
}

The five-field cron is evaluated in timezone; omitted timezone defaults to UTC. Optional startAt and endAt ISO timestamps bound the recurring window. catchupPolicy: "skip" drops missed slots after downtime; "all" replays them one per sweep until caught up. Overlapping runs are currently allowed. An overlap-suppression mode is not implemented, so the only accepted overlapPolicy is "allow".

Schedule timing is best effort. A due occurrence starts at or shortly after its recorded time; do not use it as a hard real-time clock.

A one-off stores one future fire and completes after it starts that run:

{
"definition": "daily-research-brief",
"kind": "schedule_once",
"at": "2026-08-10T16:00:00.000Z",
"input": { "topic": "launch readiness" }
}

Pass that object to sapiom_dev_agents_schedule, or call schedules.create(...) with the same fields. at must be an ISO 8601 timestamp; the schedule input must be a JSON object accepted by the agent’s entry schema when the run starts.

  1. Call sapiom_dev_agents_schedule_inspect with the definition slug:

    { "definition": "daily-research-brief" }

    Each summary includes id, kind, status, cron, timezone, and nextFireAt.

  2. { "scheduleId": "<schedule-id>" }

    Detail adds the stored input, bounds, policy, and recentFires. Each fire record has its scheduled time, state, firedAt terminalization time, and the production executionId it started (or an error when it could not start one). A cancelled pending occurrence becomes skipped, so it has a firedAt timestamp but no execution ID.

  3. Copy a non-null recentFires[].executionId into sapiom_dev_agents_inspect, or open that execution under the agent’s Runs page. The Agents dashboard observes scheduled executions like other production runs; it does not provide a schedule editor or schedule list.

The SDK equivalents are sapiom.schedules.list(definition), sapiom.schedules.get(scheduleId), and the normal run-inspection flow.

Call sapiom_dev_agents_schedule_cancel:

{ "scheduleId": "<schedule-id>" }

or await sapiom.schedules.cancel(scheduleId). Cancellation returns status disabled, marks a pending future occurrence skipped, and prevents a recurring schedule from re-arming. It does not cancel a run that already started. Cancellation is final; create a new schedule to reschedule.

Do not confuse schedules with delayed child dispatch

Section titled “Do not confuse schedules with delayed child dispatch”
OperationOwnershipWhat happens laterParent behavior
schedules.create(...) or the local schedule MCP toolStandalone control-plane triggerStarts an independent run of the definitionNo parent is linked or resumed
ctx.sapiom.agents.launch({ at }) inside an agent stepRuntime parent/child dispatchStarts one linked child run at atReturns a pause-only handle; the child’s terminal result automatically resumes the parent

Delayed child dispatch stores parent lineage and an internal trigger-<id> correlation. Use its returned handle with pauseUntilSignal; do not recreate that correlation with a standalone schedule.