Agents

Update a schedule

Changed on

Changes a schedule's name, timing, run template or overlap policy; omitted fields are left unchanged. An active schedule whose timing changed takes its next occurrence from now. Its state changes through :pause and :resume.

patch/agents/{agent_id}/schedules/{schedule_id}

Request

Path parameters

agent_idstring uuid required

The agent's id.

schedule_idstring uuid required

The schedule's id.

Request body

cron_expressionstring

Five-field cron.

end_atstring date-time nullable

No occurrence at or after this time. null clears it, so the schedule runs until deleted.

namestring

The schedule's new label.

overlap_policy'skip' | 'queue'

skip or queue.

start_atstring date-time nullable

No occurrence before this time. null clears it.

time_zonestring

The IANA time zone cron_expression is read in.

Response

OK

agent_idstring uuid required

The agent the schedule runs.

created_atstring date-time required

When the schedule was created.

cron_expressionstring required

Five-field cron: minute, hour, day of month, month, day of week.

end_atstring date-time

No occurrence at or after this time. Once it passes, the schedule ends and its runs that have not started are cancelled.

idstring uuid required

The schedule's id.

last_run_idstring uuid

The run the schedule last started.

namestring required

The schedule's label.

next_run_atstring date-time

When the next occurrence starts a run, or end_at when no occurrence is left before it. Absent unless the schedule is active.

overlap_policy'skip' | 'queue' required

skip drops an occurrence while the schedule's previous run is scheduled, queued, running or paused. queue starts it anyway, waiting for a phone like any run.

start_atstring date-time

No occurrence before this time.

state'active' | 'paused' | 'ended' required

active runs its occurrences. paused runs none until resumed. ended is final: the schedule passed its end_at.

time_zonestring required

The IANA time zone cron_expression is read in, so local times hold across daylight saving.

updated_atstring date-time required

When the schedule was last changed.

Changes