Schedules
A schedule creates jobs on a cron expression or a fixed interval. Schedules are evaluated by the server, so they survive worker restarts.
The Schedule object
sch_.skip, queue or allow.Create a schedule
POST/schedules
Creates a schedule. Either cron or every is required. every accepts durations such as 15m or 6h.
Required scope schedules:write
Request body
15m."UTC" {} "skip" Request
curl -X POST https://api.sextant.example/v2/schedules \
-H "Authorization: Bearer $SEXTANT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"nightly-report","cron":"0 2 * * *","timezone":"Europe/Paris","queue":"reports","handler":"build-report","payload":{"range":"24h"}}'const result = await sextant.schedules.create({
name: 'nightly-report',
cron: '0 2 * * *',
timezone: 'Europe/Paris',
queue: 'reports',
handler: 'build-report',
payload: {
range: '24h',
},
});result = client.schedules.create(
name="nightly-report",
cron="0 2 * * *",
timezone="Europe/Paris",
queue="reports",
handler="build-report",
payload={
"range": "24h",
},
)result, err := client.Schedules.Create(ctx, &sextant.ScheduleCreateParams{
Name: "nightly-report",
Cron: "0 2 * * *",
Timezone: "Europe/Paris",
Queue: "reports",
Handler: "build-report",
Payload: map[string]any{
"range": "24h",
},
})
if err != nil {
return err
}Responses
The schedule was created.
{
"id": "sch_2b7d1c",
"name": "nightly-report",
"cron": "0 2 * * *",
"timezone": "Europe/Paris",
"queue": "reports",
"handler": "build-report",
"payload": {
"range": "24h"
},
"paused": false,
"overlap": "skip",
"next_run_at": "2026-10-21T00:00:00Z",
"last_run_at": "2026-10-20T00:00:01Z",
"created_at": "2026-09-02T14:20:00Z"
}Invalid cron expression.
{
"error": {
"code": "validation_failed",
"message": "cron: expected 5 fields, got 6",
"param": "cron",
"request_id": "req_a4410f"
}
}List schedules
GET/schedules
Returns every schedule, ordered by name.
Required scope schedules:read
Query parameters
50 Request
curl https://api.sextant.example/v2/schedules?limit=20 \
-H "Authorization: Bearer $SEXTANT_TOKEN"const result = await sextant.schedules.list({
limit: 20,
});result = client.schedules.list(limit=20)result, err := client.Schedules.List(ctx, &sextant.ListParams{Limit: 20})
if err != nil {
return err
}Responses
A page of schedules.
{
"data": [
{
"id": "sch_2b7d1c",
"name": "nightly-report",
"cron": "0 2 * * *",
"timezone": "Europe/Paris",
"queue": "reports",
"handler": "build-report",
"payload": {
"range": "24h"
},
"paused": false,
"overlap": "skip",
"next_run_at": "2026-10-21T00:00:00Z",
"last_run_at": "2026-10-20T00:00:01Z",
"created_at": "2026-09-02T14:20:00Z"
}
],
"next_cursor": "cur_Xk92"
}Retrieve a schedule
GET/schedules/{schedule_id}
Returns one schedule with its next planned run.
Required scope schedules:read
Path parameters
Request
curl https://api.sextant.example/v2/schedules/sch_2b7d1c \
-H "Authorization: Bearer $SEXTANT_TOKEN"const result = await sextant.schedules.get('sch_2b7d1c');result = client.schedules.get("sch_2b7d1c")result, err := client.Schedules.Get(ctx, "sch_2b7d1c")
if err != nil {
return err
}Responses
The schedule.
{
"id": "sch_2b7d1c",
"name": "nightly-report",
"cron": "0 2 * * *",
"timezone": "Europe/Paris",
"queue": "reports",
"handler": "build-report",
"payload": {
"range": "24h"
},
"paused": false,
"overlap": "skip",
"next_run_at": "2026-10-21T00:00:00Z",
"last_run_at": "2026-10-20T00:00:01Z",
"created_at": "2026-09-02T14:20:00Z"
}Update a schedule
PATCH/schedules/{schedule_id}
Changes any field, including paused. A change to cron or timezone recomputes next_run_at immediately.
Required scope schedules:write
Path parameters
Request body
Request
curl -X PATCH https://api.sextant.example/v2/schedules/sch_2b7d1c \
-H "Authorization: Bearer $SEXTANT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"paused":true}'const result = await sextant.schedules.update('sch_2b7d1c', {
paused: true,
});result = client.schedules.update(
"sch_2b7d1c",
paused=True,
)result, err := client.Schedules.Update(ctx, "sch_2b7d1c", &sextant.ScheduleUpdateParams{
Paused: true,
})
if err != nil {
return err
}Responses
The updated schedule.
{
"id": "sch_2b7d1c",
"name": "nightly-report",
"cron": "0 2 * * *",
"timezone": "Europe/Paris",
"queue": "reports",
"handler": "build-report",
"payload": {
"range": "24h"
},
"paused": true,
"overlap": "skip",
"next_run_at": "2026-10-21T00:00:00Z",
"last_run_at": "2026-10-20T00:00:01Z",
"created_at": "2026-09-02T14:20:00Z"
}Delete a schedule
DELETE/schedules/{schedule_id}
Deletes the schedule. Jobs it already created are not touched.
Required scope schedules:write
Path parameters
Request
curl -X DELETE https://api.sextant.example/v2/schedules/sch_2b7d1c \
-H "Authorization: Bearer $SEXTANT_TOKEN"await sextant.schedules.delete('sch_2b7d1c');client.schedules.delete("sch_2b7d1c")if err := client.Schedules.Delete(ctx, "sch_2b7d1c"); err != nil {
return err
}Responses
Deleted. No body.
No response body.