---
search:
  tags:
    - console-backup
    - POST
seo:
  description: >-
    Refuses a cron expression that does not parse, a… Reference for the POST
    /api/v1/console-backup/schedules endpoint in the TimescaleDB Enterprise API.
  noindex: true
sidebar:
  label: Add a backup schedule
  badge: POST
title: Add a backup schedule
type: openapi-operation
---
Refuses a cron expression that does not parse, a descriptor such as @daily, a time zone, and an expression that never runs. A tick that passes while the console is down does not run later. A tick that finds a backup running records a skipped run.

`POST /api/v1/console-backup/schedules`

**Request body** (`application/json`, required)

- `cron` (string, required) — A cron expression of 5 fields (minute hour day-of-month month day-of-week), in UTC. No descriptor such as @daily and no time zone
- `enabled` (boolean, required) — false: the schedule does not run
- `keep_count` (integer<int64>, required) — After each successful run, keep the newest archives of the schedule on its target. 0: no count limit. The retention never deletes the newest successful archive, a manual archive or an archive of another console
- `max_age_days` (integer<int64>, required) — After each successful run, delete the archives of the schedule on its target that are older. 0: no age limit. Not 0 together with keep\_count
- `target_id` (string, required)
- `tiers` (string[], required) — The tiers of the archives. core is always in. logs adds the logs of the finished workflows. packs adds the loaded server packs, not the packs of the image. metrics adds the Prometheus data. A tier that this release cannot back up gives 422 (size-estimate shows the available tiers)

Request body example:

```json
{
  "cron": "string",
  "enabled": true,
  "keep_count": 0,
  "max_age_days": 0,
  "target_id": "string",
  "tiers": [
    "core"
  ]
}
```

**Responses**

- `200` — OK
- `default` — Error

Response example, 200:

```json
{
  "created_at": "2019-08-24T14:15:22Z",
  "cron": "string",
  "enabled": true,
  "id": "string",
  "keep_count": 0,
  "max_age_days": 0,
  "next_runs": [
    "2019-08-24T14:15:22Z"
  ],
  "target_id": "string",
  "tiers": [
    "string"
  ],
  "updated_at": "2019-08-24T14:15:22Z"
}
```
