# Client API: Container Apps: Schedules

> The 11 Client API operations for schedules.

Source: https://docs.coritan.com/api/reference/client/container-apps/servers-schedules/

Part of [Container Apps](/api/reference/client/container-apps/).

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/client/servers/{uuid}/schedules`](#op-get-api-v1-client-servers-uuid-schedules) | List schedules for a server |
| POST | [`/api/v1/client/servers/{uuid}/schedules`](#op-post-api-v1-client-servers-uuid-schedules) | Create a new schedule, optionally with its whole task pipeline |
| GET | [`/api/v1/client/servers/{uuid}/schedules/{schedule_uuid}`](#op-get-api-v1-client-servers-uuid-schedules-schedule-uuid) | Get a schedule |
| PUT | [`/api/v1/client/servers/{uuid}/schedules/{schedule_uuid}`](#op-put-api-v1-client-servers-uuid-schedules-schedule-uuid) | Update a schedule |
| DELETE | [`/api/v1/client/servers/{uuid}/schedules/{schedule_uuid}`](#op-delete-api-v1-client-servers-uuid-schedules-schedule-uuid) | Delete a schedule |
| POST | [`/api/v1/client/servers/{uuid}/schedules/{schedule_uuid}/execute`](#op-post-api-v1-client-servers-uuid-schedules-schedule-uuid-execute) | Queue a schedule to run now, without changing its next scheduled run |
| GET | [`/api/v1/client/servers/{uuid}/schedules/{schedule_uuid}/runs`](#op-get-api-v1-client-servers-uuid-schedules-schedule-uuid-runs) | Recent runs of a schedule, newest first, with the outcome of every step |
| POST | [`/api/v1/client/servers/{uuid}/schedules/{schedule_uuid}/tasks`](#op-post-api-v1-client-servers-uuid-schedules-schedule-uuid-tasks) | Append a task to a schedule's pipeline |
| POST | [`/api/v1/client/servers/{uuid}/schedules/{schedule_uuid}/tasks/reorder`](#op-post-api-v1-client-servers-uuid-schedules-schedule-uuid-tasks-reorder) | Set the order tasks run in |
| PUT | [`/api/v1/client/servers/{uuid}/schedules/{schedule_uuid}/tasks/{task_id}`](#op-put-api-v1-client-servers-uuid-schedules-schedule-uuid-tasks-task-id) | Edit a task in place |
| DELETE | [`/api/v1/client/servers/{uuid}/schedules/{schedule_uuid}/tasks/{task_id}`](#op-delete-api-v1-client-servers-uuid-schedules-schedule-uuid-tasks-task-id) | Remove a task from a schedule |

### List schedules for a server {#op-get-api-v1-client-servers-uuid-schedules}

`GET /api/v1/client/servers/{uuid}/schedules`

List schedules for a server.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

A `200` response is a list; each item has these fields:

| Field | Type |
| --- | --- |
| `[].id` | integer |
| `[].uuid` | string |
| `[].server_id` | integer |
| `[].name` | string |
| `[].cron_minute` | string |
| `[].cron_hour` | string |
| `[].cron_day_of_month` | string |
| `[].cron_month` | string |
| `[].cron_day_of_week` | string |
| `[].is_active` | boolean |
| `[].only_when_online` | boolean |
| `[].is_processing` | boolean |
| `[].timezone` | string |
| `[].catch_up` | boolean |
| `[].revision` | integer |
| `[].current_run_id` | string or null |
| `[].last_run_status` | string or null |
| `[].next_run_at` | string (date-time) or null |
| `[].last_run_at` | string (date-time) or null |
| `[].last_run_failed` | boolean |
| `[].last_failure_message` | string or null |
| `[].created_at` | string (date-time) |
| `[].updated_at` | string (date-time) or null |
| `[].tasks` | array of TaskResponse |
| `[].tasks[].id` | integer |
| `[].tasks[].sequence_id` | integer |
| `[].tasks[].action` | string |
| `[].tasks[].payload` | Payload |
| `[].tasks[].time_offset` | integer |
| `[].tasks[].continue_on_failure` | boolean |
| `[].tasks[].is_queued` | boolean |

### Create a new schedule, optionally with its whole task pipeline {#op-post-api-v1-client-servers-uuid-schedules}

`POST /api/v1/client/servers/{uuid}/schedules`

Create a new schedule, optionally with its whole task pipeline.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `name` | string | yes |
| `cron_minute` | string | yes |
| `cron_hour` | string | yes |
| `cron_day_of_month` | string | yes |
| `cron_month` | string | yes |
| `cron_day_of_week` | string | yes |
| `is_active` | boolean | no |
| `only_when_online` | boolean | no |
| `timezone` | string | no |
| `catch_up` | boolean | no |
| `tasks` | array of TaskCreate or null | no |
| `tasks[].action` | string | yes |
| `tasks[].payload` | object or null | no |
| `tasks[].time_offset` | integer | no |
| `tasks[].sequence_id` | integer or null | no |
| `tasks[].continue_on_failure` | boolean | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `201` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

Fields of a `201` response:

| Field | Type |
| --- | --- |
| `id` | integer |
| `uuid` | string |
| `server_id` | integer |
| `name` | string |
| `cron_minute` | string |
| `cron_hour` | string |
| `cron_day_of_month` | string |
| `cron_month` | string |
| `cron_day_of_week` | string |
| `is_active` | boolean |
| `only_when_online` | boolean |
| `is_processing` | boolean |
| `timezone` | string |
| `catch_up` | boolean |
| `revision` | integer |
| `current_run_id` | string or null |
| `last_run_status` | string or null |
| `next_run_at` | string (date-time) or null |
| `last_run_at` | string (date-time) or null |
| `last_run_failed` | boolean |
| `last_failure_message` | string or null |
| `created_at` | string (date-time) |
| `updated_at` | string (date-time) or null |
| `tasks` | array of TaskResponse |
| `tasks[].id` | integer |
| `tasks[].sequence_id` | integer |
| `tasks[].action` | string |
| `tasks[].payload` | Payload |
| `tasks[].time_offset` | integer |
| `tasks[].continue_on_failure` | boolean |
| `tasks[].is_queued` | boolean |

### Get a schedule {#op-get-api-v1-client-servers-uuid-schedules-schedule-uuid}

`GET /api/v1/client/servers/{uuid}/schedules/{schedule_uuid}`

Get a schedule.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |
| `schedule_uuid` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

Fields of a `200` response:

| Field | Type |
| --- | --- |
| `id` | integer |
| `uuid` | string |
| `server_id` | integer |
| `name` | string |
| `cron_minute` | string |
| `cron_hour` | string |
| `cron_day_of_month` | string |
| `cron_month` | string |
| `cron_day_of_week` | string |
| `is_active` | boolean |
| `only_when_online` | boolean |
| `is_processing` | boolean |
| `timezone` | string |
| `catch_up` | boolean |
| `revision` | integer |
| `current_run_id` | string or null |
| `last_run_status` | string or null |
| `next_run_at` | string (date-time) or null |
| `last_run_at` | string (date-time) or null |
| `last_run_failed` | boolean |
| `last_failure_message` | string or null |
| `created_at` | string (date-time) |
| `updated_at` | string (date-time) or null |
| `tasks` | array of TaskResponse |
| `tasks[].id` | integer |
| `tasks[].sequence_id` | integer |
| `tasks[].action` | string |
| `tasks[].payload` | Payload |
| `tasks[].time_offset` | integer |
| `tasks[].continue_on_failure` | boolean |
| `tasks[].is_queued` | boolean |

### Update a schedule {#op-put-api-v1-client-servers-uuid-schedules-schedule-uuid}

`PUT /api/v1/client/servers/{uuid}/schedules/{schedule_uuid}`

Update a schedule.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |
| `schedule_uuid` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `name` | string or null | no |
| `cron_minute` | string or null | no |
| `cron_hour` | string or null | no |
| `cron_day_of_month` | string or null | no |
| `cron_month` | string or null | no |
| `cron_day_of_week` | string or null | no |
| `is_active` | boolean or null | no |
| `only_when_online` | boolean or null | no |
| `timezone` | string or null | no |
| `catch_up` | boolean or null | no |
| `revision` | integer or null | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

Fields of a `200` response:

| Field | Type |
| --- | --- |
| `id` | integer |
| `uuid` | string |
| `server_id` | integer |
| `name` | string |
| `cron_minute` | string |
| `cron_hour` | string |
| `cron_day_of_month` | string |
| `cron_month` | string |
| `cron_day_of_week` | string |
| `is_active` | boolean |
| `only_when_online` | boolean |
| `is_processing` | boolean |
| `timezone` | string |
| `catch_up` | boolean |
| `revision` | integer |
| `current_run_id` | string or null |
| `last_run_status` | string or null |
| `next_run_at` | string (date-time) or null |
| `last_run_at` | string (date-time) or null |
| `last_run_failed` | boolean |
| `last_failure_message` | string or null |
| `created_at` | string (date-time) |
| `updated_at` | string (date-time) or null |
| `tasks` | array of TaskResponse |
| `tasks[].id` | integer |
| `tasks[].sequence_id` | integer |
| `tasks[].action` | string |
| `tasks[].payload` | Payload |
| `tasks[].time_offset` | integer |
| `tasks[].continue_on_failure` | boolean |
| `tasks[].is_queued` | boolean |

### Delete a schedule {#op-delete-api-v1-client-servers-uuid-schedules-schedule-uuid}

`DELETE /api/v1/client/servers/{uuid}/schedules/{schedule_uuid}`

Delete a schedule.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |
| `schedule_uuid` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Queue a schedule to run now, without changing its next scheduled run {#op-post-api-v1-client-servers-uuid-schedules-schedule-uuid-execute}

`POST /api/v1/client/servers/{uuid}/schedules/{schedule_uuid}/execute`

Queue a schedule to run now, without changing its next scheduled run.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |
| `schedule_uuid` | path | string | yes |

#### Request body

`application/json`

| Field | Type | Required |
| --- | --- | --- |
| `revision` | integer or null | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Recent runs of a schedule, newest first, with the outcome of every step {#op-get-api-v1-client-servers-uuid-schedules-schedule-uuid-runs}

`GET /api/v1/client/servers/{uuid}/schedules/{schedule_uuid}/runs`

Recent runs of a schedule, newest first, with the outcome of every step.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuid` | path | string | yes |  |
| `schedule_uuid` | path | string | yes |  |
| `limit` | query | integer | no | Default: `20`. |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

A `200` response is a list; each item has these fields:

| Field | Type |
| --- | --- |
| `[].uuid` | string |
| `[].trigger` | string |
| `[].status` | string |
| `[].started_at` | string (date-time) or null |
| `[].finished_at` | string (date-time) or null |
| `[].failure_message` | string or null |
| `[].created_at` | string (date-time) or null |
| `[].steps` | array of ScheduleRunStepResponse |
| `[].steps[].task_id` | integer |
| `[].steps[].sequence_id` | integer |
| `[].steps[].action` | string |
| `[].steps[].payload` | Payload |
| `[].steps[].time_offset` | integer |
| `[].steps[].continue_on_failure` | boolean |
| `[].steps[].status` | string |
| `[].steps[].started_at` | string (date-time) or null |
| `[].steps[].finished_at` | string (date-time) or null |
| `[].steps[].error` | string or null |

### Append a task to a schedule's pipeline {#op-post-api-v1-client-servers-uuid-schedules-schedule-uuid-tasks}

`POST /api/v1/client/servers/{uuid}/schedules/{schedule_uuid}/tasks`

Append a task to a schedule's pipeline.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |
| `schedule_uuid` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `action` | string | yes |
| `payload` | object or null | no |
| `time_offset` | integer | no |
| `sequence_id` | integer or null | no |
| `continue_on_failure` | boolean | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `201` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

Fields of a `201` response:

| Field | Type |
| --- | --- |
| `id` | integer |
| `sequence_id` | integer |
| `action` | string |
| `payload` | Payload |
| `time_offset` | integer |
| `continue_on_failure` | boolean |
| `is_queued` | boolean |

### Set the order tasks run in {#op-post-api-v1-client-servers-uuid-schedules-schedule-uuid-tasks-reorder}

`POST /api/v1/client/servers/{uuid}/schedules/{schedule_uuid}/tasks/reorder`

Set the order tasks run in.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |
| `schedule_uuid` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `task_ids` | array of integer | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

A `200` response is a list; each item has these fields:

| Field | Type |
| --- | --- |
| `[].id` | integer |
| `[].sequence_id` | integer |
| `[].action` | string |
| `[].payload` | Payload |
| `[].time_offset` | integer |
| `[].continue_on_failure` | boolean |
| `[].is_queued` | boolean |

### Edit a task in place {#op-put-api-v1-client-servers-uuid-schedules-schedule-uuid-tasks-task-id}

`PUT /api/v1/client/servers/{uuid}/schedules/{schedule_uuid}/tasks/{task_id}`

Edit a task in place.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |
| `schedule_uuid` | path | string | yes |
| `task_id` | path | integer | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `action` | string or null | no |
| `payload` | object or null | no |
| `time_offset` | integer or null | no |
| `sequence_id` | integer or null | no |
| `continue_on_failure` | boolean or null | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

Fields of a `200` response:

| Field | Type |
| --- | --- |
| `id` | integer |
| `sequence_id` | integer |
| `action` | string |
| `payload` | Payload |
| `time_offset` | integer |
| `continue_on_failure` | boolean |
| `is_queued` | boolean |

### Remove a task from a schedule {#op-delete-api-v1-client-servers-uuid-schedules-schedule-uuid-tasks-task-id}

`DELETE /api/v1/client/servers/{uuid}/schedules/{schedule_uuid}/tasks/{task_id}`

Remove a task from a schedule.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |
| `schedule_uuid` | path | string | yes |
| `task_id` | path | integer | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |
