Schedules
Cron schedules that run a command or put a message into an inbox
Resource, request and plan limits are listed on Limits.
Download OpenAPI specification · Version 0.1.0
List the schedules of an SVM
Returns every schedule of an SVM by name, with its action, concurrency rule and next fire. A schedule fires from control, so it wakes a sleeping SVM at its time.
Authorization
apiKeyAuthorizationBearer <token>An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.
Path Parameters
ref*stringThe SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.
1 <= lengthQuery Parameters
project?stringThe project id or name, default when omitted; an unknown project answers 404 project_not_found.
Response Body
The schedules of the SVM, by name; an SVM with none gets [].
application/json- response
The schedules of the SVM, by name; an SVM with none gets [].
[index: integer]?One schedule of an SVM.
curl -X GET 'https://api.slashinfra.com/svms/build-1/schedules'[ { "action": { "command": "make backup", "timeout_s": 600, "type": "command" }, "concurrency": "skip", "created_ms": 1767225600000, "cron": "0 3 * * *", "enabled": true, "id": "01JCK3AAAAAAAAAAAAAAAAAAAA", "name": "nightly-backup", "next_at": 1767225600000, "project": "proj_6f1c0f0e8a", "timezone": "Europe/Berlin" }]Create a schedule of an SVM
Creates a schedule that runs a command, puts a message into the inbox or captures a backup snapshot on a five-field cron in an IANA timezone, and the minute tick wakes the SVM for it. A cron whose fires are closer than the plan minimum answers 400 schedule_too_frequent; see schedules for keep retention.
Authorization
apiKeyAuthorizationBearer <token>An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.
Path Parameters
ref*stringThe SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.
1 <= lengthQuery Parameters
project?stringThe project id or name, default when omitted; an unknown project answers 404 project_not_found.
Request Body
- body
action*One action of a schedule: a command in the SVM, a message into its inbox, or a disk snapshot with retention.
concurrency?stringskip (default) refuses a fire while the previous run still runs; allow starts both.
cron*stringA five-field cron whose next two fires are at least the plan minimum apart.
enabled?booleanWhether the minute tick fires it; it is on by default.
name*stringThe name, unique per SVM: ^[a-z0-9-]{1,40}$.
timezone?stringAn IANA timezone; UTC by default.
Response Body
One schedule of an SVM.
application/json- response
One schedule of an SVM.
action*||The command, inbox message or snapshot of one fire.
concurrency*stringskip refuses a fire while the previous run still runs; allow starts both.
"skip""allow"created_ms*integerThe creation time in milliseconds since the Unix epoch.
cron*stringThe normalized five-field cron.
enabled*booleanWhether the minute tick fires it.
id*stringThe schedule id.
name*stringThe name of the schedule, unique per SVM.
next_at*integerThe next fire in milliseconds since the Unix epoch; it moves when the tick claims a run.
project*stringThe id of the project of the SVM, which the schedule inherits and never takes as a parameter.
timezone*stringThe IANA timezone of the cron.
curl -X POST 'https://api.slashinfra.com/svms/build-1/schedules' \ -H 'Content-Type: application/json' \ -d '{ "action": { "type": "command" }, "cron": "0 3 * * *", "name": "nightly-backup"}'{ "action": { "command": "make backup", "timeout_s": 600, "type": "command" }, "concurrency": "skip", "created_ms": 1767225600000, "cron": "0 3 * * *", "enabled": true, "id": "01JCK3AAAAAAAAAAAAAAAAAAAA", "name": "nightly-backup", "next_at": 1767225600000, "project": "proj_6f1c0f0e8a", "timezone": "Europe/Berlin"}Delete a schedule
Deletes a schedule and its run history. A run that is already queued is acknowledged and fires nothing.
Authorization
apiKeyAuthorizationBearer <token>An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.
Path Parameters
ref*stringThe SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.
1 <= lengthid*stringThe schedule id.
1 <= lengthQuery Parameters
project?stringThe project id or name, default when omitted; an unknown project answers 404 project_not_found.
Response Body
The schedule and its runs are deleted, with no body.
response?stringtext/plainThe schedule and its runs are deleted, with no body.
curl -X DELETE 'https://api.slashinfra.com/svms/build-1/schedules/01JCK3AAAAAAAAAAAAAAAAAAAA'"string"Show a schedule
Returns one schedule of an SVM, with its next fire in next_at.
Authorization
apiKeyAuthorizationBearer <token>An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.
Path Parameters
ref*stringThe SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.
1 <= lengthid*stringThe schedule id.
1 <= lengthQuery Parameters
project?stringThe project id or name, default when omitted; an unknown project answers 404 project_not_found.
Response Body
One schedule of an SVM.
application/json- response
One schedule of an SVM.
action*||The command, inbox message or snapshot of one fire.
concurrency*stringskip refuses a fire while the previous run still runs; allow starts both.
"skip""allow"created_ms*integerThe creation time in milliseconds since the Unix epoch.
cron*stringThe normalized five-field cron.
enabled*booleanWhether the minute tick fires it.
id*stringThe schedule id.
name*stringThe name of the schedule, unique per SVM.
next_at*integerThe next fire in milliseconds since the Unix epoch; it moves when the tick claims a run.
project*stringThe id of the project of the SVM, which the schedule inherits and never takes as a parameter.
timezone*stringThe IANA timezone of the cron.
curl -X GET 'https://api.slashinfra.com/svms/build-1/schedules/01JCK3AAAAAAAAAAAAAAAAAAAA'{ "action": { "command": "make backup", "timeout_s": 600, "type": "command" }, "concurrency": "skip", "created_ms": 1767225600000, "cron": "0 3 * * *", "enabled": true, "id": "01JCK3AAAAAAAAAAAAAAAAAAAA", "name": "nightly-backup", "next_at": 1767225600000, "project": "proj_6f1c0f0e8a", "timezone": "Europe/Berlin"}Change a schedule
Changes the given fields and recomputes the next fire from now; action replaces the whole action, and turning a schedule off keeps its row for a later patch to turn on again.
Authorization
apiKeyAuthorizationBearer <token>An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.
Path Parameters
ref*stringThe SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.
1 <= lengthid*stringThe schedule id.
1 <= lengthQuery Parameters
project?stringThe project id or name, default when omitted; an unknown project answers 404 project_not_found.
Request Body
- body
action?One action of a schedule: a command in the SVM, a message into its inbox, or a disk snapshot with retention.
concurrency?stringskip or allow.
cron?stringA five-field cron.
enabled?booleanWhether the minute tick fires it.
name?stringThe new name, unique per SVM: ^[a-z0-9-]{1,40}$.
timezone?stringAn IANA timezone.
Response Body
One schedule of an SVM.
application/json- response
One schedule of an SVM.
action*||The command, inbox message or snapshot of one fire.
concurrency*stringskip refuses a fire while the previous run still runs; allow starts both.
"skip""allow"created_ms*integerThe creation time in milliseconds since the Unix epoch.
cron*stringThe normalized five-field cron.
enabled*booleanWhether the minute tick fires it.
id*stringThe schedule id.
name*stringThe name of the schedule, unique per SVM.
next_at*integerThe next fire in milliseconds since the Unix epoch; it moves when the tick claims a run.
project*stringThe id of the project of the SVM, which the schedule inherits and never takes as a parameter.
timezone*stringThe IANA timezone of the cron.
curl -X PATCH 'https://api.slashinfra.com/svms/build-1/schedules/01JCK3AAAAAAAAAAAAAAAAAAAA' \ -H 'Content-Type: application/json' \ -d '{}'{ "action": { "command": "make backup", "timeout_s": 600, "type": "command" }, "concurrency": "skip", "created_ms": 1767225600000, "cron": "0 3 * * *", "enabled": true, "id": "01JCK3AAAAAAAAAAAAAAAAAAAA", "name": "nightly-backup", "next_at": 1767225600000, "project": "proj_6f1c0f0e8a", "timezone": "Europe/Berlin"}Run a schedule now
Queues one fire now, even when the schedule is disabled, without moving the next fire; the run appears in GET …/runs once it is recorded.
Authorization
apiKeyAuthorizationBearer <token>An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.
Path Parameters
ref*stringThe SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.
1 <= lengthid*stringThe schedule id.
1 <= lengthQuery Parameters
project?stringThe project id or name, default when omitted; an unknown project answers 404 project_not_found.
Response Body
The run is queued and the next tick does not change; GET …/runs shows its outcome.
application/json- response
The run is queued and the next tick does not change; GET …/runs shows its outcome.
due_ms*integerThe due time of the run in milliseconds since the Unix epoch.
run*stringThe run id.
curl -X POST 'https://api.slashinfra.com/svms/build-1/schedules/01JCK3AAAAAAAAAAAAAAAAAAAA/run'{ "due_ms": 1767225600000, "run": "01JCK3AAAAAAAAAAAAAAAAAAAA:1767225600000"}List the runs of a schedule
Returns the last 50 fires of a schedule, newest first, with their status and guest job number.
Authorization
apiKeyAuthorizationBearer <token>An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.
Path Parameters
ref*stringThe SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.
1 <= lengthid*stringThe schedule id.
1 <= lengthQuery Parameters
project?stringThe project id or name, default when omitted; an unknown project answers 404 project_not_found.
Response Body
The last 50 runs of the schedule, newest first; a schedule that never ran gets [].
application/json- response
The last 50 runs of the schedule, newest first; a schedule that never ran gets [].
[index: integer]?One fire of a schedule.
curl -X GET 'https://api.slashinfra.com/svms/build-1/schedules/01JCK3AAAAAAAAAAAAAAAAAAAA/runs'[ { "detail": "string", "due_ms": 1767225600000, "id": "01JCK3AAAAAAAAAAAAAAAAAAAA:1767225600000", "job": 7, "started_ms": 1767225601000, "status": "started" }]curl -X GET 'https://api.slashinfra.com/svms/build-1/schedules'[
{
"action": {
"command": "make backup",
"timeout_s": 600,
"type": "command"
},
"concurrency": "skip",
"created_ms": 1767225600000,
"cron": "0 3 * * *",
"enabled": true,
"id": "01JCK3AAAAAAAAAAAAAAAAAAAA",
"name": "nightly-backup",
"next_at": 1767225600000,
"project": "proj_6f1c0f0e8a",
"timezone": "Europe/Berlin"
}
]curl -X POST 'https://api.slashinfra.com/svms/build-1/schedules' \
-H 'Content-Type: application/json' \
-d '{
"action": {
"type": "command"
},
"cron": "0 3 * * *",
"name": "nightly-backup"
}'{
"action": {
"command": "make backup",
"timeout_s": 600,
"type": "command"
},
"concurrency": "skip",
"created_ms": 1767225600000,
"cron": "0 3 * * *",
"enabled": true,
"id": "01JCK3AAAAAAAAAAAAAAAAAAAA",
"name": "nightly-backup",
"next_at": 1767225600000,
"project": "proj_6f1c0f0e8a",
"timezone": "Europe/Berlin"
}curl -X DELETE 'https://api.slashinfra.com/svms/build-1/schedules/01JCK3AAAAAAAAAAAAAAAAAAAA'"string"curl -X GET 'https://api.slashinfra.com/svms/build-1/schedules/01JCK3AAAAAAAAAAAAAAAAAAAA'{
"action": {
"command": "make backup",
"timeout_s": 600,
"type": "command"
},
"concurrency": "skip",
"created_ms": 1767225600000,
"cron": "0 3 * * *",
"enabled": true,
"id": "01JCK3AAAAAAAAAAAAAAAAAAAA",
"name": "nightly-backup",
"next_at": 1767225600000,
"project": "proj_6f1c0f0e8a",
"timezone": "Europe/Berlin"
}curl -X PATCH 'https://api.slashinfra.com/svms/build-1/schedules/01JCK3AAAAAAAAAAAAAAAAAAAA' \
-H 'Content-Type: application/json' \
-d '{}'{
"action": {
"command": "make backup",
"timeout_s": 600,
"type": "command"
},
"concurrency": "skip",
"created_ms": 1767225600000,
"cron": "0 3 * * *",
"enabled": true,
"id": "01JCK3AAAAAAAAAAAAAAAAAAAA",
"name": "nightly-backup",
"next_at": 1767225600000,
"project": "proj_6f1c0f0e8a",
"timezone": "Europe/Berlin"
}curl -X POST 'https://api.slashinfra.com/svms/build-1/schedules/01JCK3AAAAAAAAAAAAAAAAAAAA/run'{
"due_ms": 1767225600000,
"run": "01JCK3AAAAAAAAAAAAAAAAAAAA:1767225600000"
}curl -X GET 'https://api.slashinfra.com/svms/build-1/schedules/01JCK3AAAAAAAAAAAAAAAAAAAA/runs'[
{
"detail": "string",
"due_ms": 1767225600000,
"id": "01JCK3AAAAAAAAAAAAAAAAAAAA:1767225600000",
"job": 7,
"started_ms": 1767225601000,
"status": "started"
}
]