Skip to main content
POST
Create a schedule
Minimum role required: Member

Authorizations

X-Axilio-Api-Key
string
header
required

Customer API key (axl_ prefix).

Path Parameters

agent_id
string<uuid>
required

The agent's id.

Body

application/json

Request body for creating a schedule of an agent.

cron_expression
string
required

Five-field cron: minute, hour, day of month, month, day of week. For example 0 9 * * 1-5 is 09:00 on weekdays.

Required string length: 1 - 200
time_zone
string
required

The IANA time zone cron_expression is read in, for example America/Los_Angeles or UTC.

Required string length: 1 - 64
end_at
string<date-time>

No occurrence at or after this time. Leave out to run until deleted.

name
string

A label for the schedule.

Maximum string length: 100
overlap_policy
enum<string>

skip (default) drops an occurrence while the previous run is unfinished; queue starts it anyway.

Available options:
skip,
queue
run_template
object

What each run starts with.

start_at
string<date-time>

No occurrence before this time. Leave out to start now.

Response

Created

A schedule: an agent's recurring runs. Each occurrence of cron_expression, read in time_zone, starts a run with trigger scheduled and this schedule_id.

agent_id
string<uuid>
required

The agent the schedule runs.

created_at
string<date-time>
required

When the schedule was created.

cron_expression
string
required

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

id
string<uuid>
required

The schedule's id.

name
string
required

The schedule's label.

overlap_policy
enum<string>
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.

Available options:
skip,
queue
run_template
object
required

What each run starts with.

state
enum<string>
required

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

Available options:
active,
paused,
ended
time_zone
string
required

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

updated_at
string<date-time>
required

When the schedule was last changed.

end_at
string<date-time>

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

last_run_id
string<uuid>

The run the schedule last started.

next_run_at
string<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.

start_at
string<date-time>

No occurrence before this time.