Skip to content

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

GET
/svms/{ref}/schedules

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

apiKey
headerAuthorizationBearer <token>

An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.

Path Parameters

ref*string

The SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.

Length1 <= length

Query Parameters

project?string

The 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
  1. response

The schedules of the SVM, by name; an SVM with none gets [].

[index: integer]?

One schedule of an SVM.

Example Request
curl -X GET 'https://api.slashinfra.com/svms/build-1/schedules'
Example Response
[  {    "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

POST
/svms/{ref}/schedules

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

apiKey
headerAuthorizationBearer <token>

An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.

Path Parameters

ref*string

The SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.

Length1 <= length

Query Parameters

project?string

The project id or name, default when omitted; an unknown project answers 404 project_not_found.

Request Body

  1. body
action*

One action of a schedule: a command in the SVM, a message into its inbox, or a disk snapshot with retention.

concurrency?string

skip (default) refuses a fire while the previous run still runs; allow starts both.

cron*string

A five-field cron whose next two fires are at least the plan minimum apart.

enabled?boolean

Whether the minute tick fires it; it is on by default.

name*string

The name, unique per SVM: ^[a-z0-9-]{1,40}$.

timezone?string

An IANA timezone; UTC by default.

Response Body

One schedule of an SVM.

application/json
  1. response

One schedule of an SVM.

action*||

The command, inbox message or snapshot of one fire.

concurrency*string

skip refuses a fire while the previous run still runs; allow starts both.

Value in"skip""allow"
created_ms*integer

The creation time in milliseconds since the Unix epoch.

cron*string

The normalized five-field cron.

enabled*boolean

Whether the minute tick fires it.

id*string

The schedule id.

name*string

The name of the schedule, unique per SVM.

next_at*integer

The next fire in milliseconds since the Unix epoch; it moves when the tick claims a run.

project*string

The id of the project of the SVM, which the schedule inherits and never takes as a parameter.

timezone*string

The IANA timezone of the cron.

Example Request
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"}'
Example Response
{  "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

DELETE
/svms/{ref}/schedules/{id}

Deletes a schedule and its run history. A run that is already queued is acknowledged and fires nothing.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.

Path Parameters

ref*string

The SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.

Length1 <= length
id*string

The schedule id.

Length1 <= length

Query Parameters

project?string

The 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/plain

The schedule and its runs are deleted, with no body.

Example Request
curl -X DELETE 'https://api.slashinfra.com/svms/build-1/schedules/01JCK3AAAAAAAAAAAAAAAAAAAA'
Example Response
"string"

Show a schedule

GET
/svms/{ref}/schedules/{id}

Returns one schedule of an SVM, with its next fire in next_at.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.

Path Parameters

ref*string

The SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.

Length1 <= length
id*string

The schedule id.

Length1 <= length

Query Parameters

project?string

The project id or name, default when omitted; an unknown project answers 404 project_not_found.

Response Body

One schedule of an SVM.

application/json
  1. response

One schedule of an SVM.

action*||

The command, inbox message or snapshot of one fire.

concurrency*string

skip refuses a fire while the previous run still runs; allow starts both.

Value in"skip""allow"
created_ms*integer

The creation time in milliseconds since the Unix epoch.

cron*string

The normalized five-field cron.

enabled*boolean

Whether the minute tick fires it.

id*string

The schedule id.

name*string

The name of the schedule, unique per SVM.

next_at*integer

The next fire in milliseconds since the Unix epoch; it moves when the tick claims a run.

project*string

The id of the project of the SVM, which the schedule inherits and never takes as a parameter.

timezone*string

The IANA timezone of the cron.

Example Request
curl -X GET 'https://api.slashinfra.com/svms/build-1/schedules/01JCK3AAAAAAAAAAAAAAAAAAAA'
Example Response
{  "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

PATCH
/svms/{ref}/schedules/{id}

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

apiKey
headerAuthorizationBearer <token>

An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.

Path Parameters

ref*string

The SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.

Length1 <= length
id*string

The schedule id.

Length1 <= length

Query Parameters

project?string

The project id or name, default when omitted; an unknown project answers 404 project_not_found.

Request Body

  1. body
action?

One action of a schedule: a command in the SVM, a message into its inbox, or a disk snapshot with retention.

concurrency?string

skip or allow.

cron?string

A five-field cron.

enabled?boolean

Whether the minute tick fires it.

name?string

The new name, unique per SVM: ^[a-z0-9-]{1,40}$.

timezone?string

An IANA timezone.

Response Body

One schedule of an SVM.

application/json
  1. response

One schedule of an SVM.

action*||

The command, inbox message or snapshot of one fire.

concurrency*string

skip refuses a fire while the previous run still runs; allow starts both.

Value in"skip""allow"
created_ms*integer

The creation time in milliseconds since the Unix epoch.

cron*string

The normalized five-field cron.

enabled*boolean

Whether the minute tick fires it.

id*string

The schedule id.

name*string

The name of the schedule, unique per SVM.

next_at*integer

The next fire in milliseconds since the Unix epoch; it moves when the tick claims a run.

project*string

The id of the project of the SVM, which the schedule inherits and never takes as a parameter.

timezone*string

The IANA timezone of the cron.

Example Request
curl -X PATCH 'https://api.slashinfra.com/svms/build-1/schedules/01JCK3AAAAAAAAAAAAAAAAAAAA' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "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

POST
/svms/{ref}/schedules/{id}/run

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

apiKey
headerAuthorizationBearer <token>

An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.

Path Parameters

ref*string

The SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.

Length1 <= length
id*string

The schedule id.

Length1 <= length

Query Parameters

project?string

The 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
  1. response

The run is queued and the next tick does not change; GET …/runs shows its outcome.

due_ms*integer

The due time of the run in milliseconds since the Unix epoch.

run*string

The run id.

Example Request
curl -X POST 'https://api.slashinfra.com/svms/build-1/schedules/01JCK3AAAAAAAAAAAAAAAAAAAA/run'
Example Response
{  "due_ms": 1767225600000,  "run": "01JCK3AAAAAAAAAAAAAAAAAAAA:1767225600000"}

List the runs of a schedule

GET
/svms/{ref}/schedules/{id}/runs

Returns the last 50 fires of a schedule, newest first, with their status and guest job number.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.

Path Parameters

ref*string

The SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.

Length1 <= length
id*string

The schedule id.

Length1 <= length

Query Parameters

project?string

The 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
  1. response

The last 50 runs of the schedule, newest first; a schedule that never ran gets [].

[index: integer]?

One fire of a schedule.

Example Request
curl -X GET 'https://api.slashinfra.com/svms/build-1/schedules/01JCK3AAAAAAAAAAAAAAAAAAAA/runs'
Example Response
[  {    "detail": "string",    "due_ms": 1767225600000,    "id": "01JCK3AAAAAAAAAAAAAAAAAAAA:1767225600000",    "job": 7,    "started_ms": 1767225601000,    "status": "started"  }]