# Schedules

Cron schedules that run a command or put a message into an inbox

Source: https://slashinfra.com/docs/api-reference/control/schedules
Last modified: 2026-11-30T16:36:19.000Z

Cron schedules that run a command or put a message into an inbox

Resource, request and plan limits are listed on [Limits](https://slashinfra.com/docs/reference/limits).

[Download OpenAPI specification](https://slashinfra.com/docs/control.openapi.json) · Version 0.1.0

[GETList the schedules of an SVM](https://slashinfra.com/docs/api-reference/control/schedules#getSvmsByRefSchedules)[POSTCreate a schedule of an SVM](https://slashinfra.com/docs/api-reference/control/schedules#postSvmsByRefSchedules)[DELETEDelete a schedule](https://slashinfra.com/docs/api-reference/control/schedules#deleteSvmsByRefSchedulesById)[GETShow a schedule](https://slashinfra.com/docs/api-reference/control/schedules#getSvmsByRefSchedulesById)[PATCHChange a schedule](https://slashinfra.com/docs/api-reference/control/schedules#patchSvmsByRefSchedulesById)[POSTRun a schedule now](https://slashinfra.com/docs/api-reference/control/schedules#postSvmsByRefSchedulesByIdRun)[GETList the runs of a schedule](https://slashinfra.com/docs/api-reference/control/schedules#getSvmsByRefSchedulesByIdRuns)

### 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`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/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.

Length`1 <= 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`

- response

- 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 ResponseSchema

```
[  {    "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](https://slashinfra.com/docs/platform/schedules) for `keep` retention.

#### Authorization

`apiKey`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/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.

Length`1 <= length`

#### Query Parameters

`project?`string

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

#### Request Body

- 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?`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`

- response

- 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 ResponseSchema

```
{  "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`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/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.

Length`1 <= length`

`id*`string

The schedule id.

Length`1 <= 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?`string`text/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 ResponseSchema

```
"string"
```

### Show a schedule

GET

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

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

#### Authorization

`apiKey`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/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.

Length`1 <= length`

`id*`string

The schedule id.

Length`1 <= 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`

- response

- 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 ResponseSchema

```
{  "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`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/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.

Length`1 <= length`

`id*`string

The schedule id.

Length`1 <= length`

#### Query Parameters

`project?`string

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

#### Request Body

- 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?`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`

- response

- 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 ResponseSchema

```
{  "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`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/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.

Length`1 <= length`

`id*`string

The schedule id.

Length`1 <= 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`

- response

- 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 ResponseSchema

```
{  "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`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/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.

Length`1 <= length`

`id*`string

The schedule id.

Length`1 <= 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`

- response

- 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 ResponseSchema

```
[  {    "detail": "string",    "due_ms": 1767225600000,    "id": "01JCK3AAAAAAAAAAAAAAAAAAAA:1767225600000",    "job": 7,    "started_ms": 1767225601000,    "status": "started"  }]
```

GET

/svms/{ref}/schedules

Example Request

```
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"
}
]
```

POST

/svms/{ref}/schedules

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"
}'
```

```
{
"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

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

Example Request

```
curl -X DELETE 'https://api.slashinfra.com/svms/build-1/schedules/01JCK3AAAAAAAAAAAAAAAAAAAA'
```

```
"string"
```

GET

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

Example Request

```
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"
}
```

PATCH

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

Example Request

```
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"
}
```

POST

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

Example Request

```
curl -X POST 'https://api.slashinfra.com/svms/build-1/schedules/01JCK3AAAAAAAAAAAAAAAAAAAA/run'
```

```
{
"due_ms": 1767225600000,
"run": "01JCK3AAAAAAAAAAAAAAAAAAAA:1767225600000"
}
```

GET

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

Example Request

```
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"
}
]
```
