# Scheduled maintenance

Scheduled maintenance tells your customers about planned work before it starts. While a maintenance is in progress, its components show **Maintenance** on the [status page](/status-pages/introduction). Spectate can start and complete it on schedule and email your subscribers at each step.

## Statuses

| Status | Value | Dashboard label | Meaning |
|---|---|---|---|
| Scheduled | `scheduled` | Scheduled | Announced, not started yet. |
| In progress | `in_progress` | In progress | The work is going on. Its components show as under maintenance. |
| Completed | `completed` | Done | The work is over. |

## Schedule maintenance

Owners, managers and admins can schedule maintenance.

1. In the dashboard, open the status page and go to the **Maintenance** tab.
2. Select **Schedule maintenance**.
3. Type a **Title**, for example `Database upgrade`.
4. Optional: type a **Description**, for example `Expect up to 5 minutes of read-only mode.`
5. Set **Starts at**. It must be in the future.
6. Optional: set a **Planned end**.
7. Select the mode: **Automatic** or **Manual**.
8. Under **Affected components**, select the components.
9. Optional: clear **Notify subscribers by email**.
10. Select **Schedule maintenance**.

The dashboard shows times in your own time zone. To affect components, the page must have [components](/status-pages/components) first.

## Automatic and manual mode

| Mode | Start | End |
|---|---|---|
| **Automatic** (default) | Spectate starts it at **Starts at**. | Spectate completes it at **Planned end**. Without a planned end, you complete it yourself. |
| **Manual** | You set it to **In progress**. | You set it to **Done**. |

Spectate checks for maintenance to start or complete every minute. A manual maintenance stays in progress after its planned end until you set it to **Done**. If you switch a manual maintenance to automatic, Spectate applies a start or end that is already past within a minute.

A planned end is optional because the end of the work is often not known.

## Change the status by hand

Each maintenance on the **Maintenance** tab has a status control with **Scheduled**, **In progress** and **Done**. Select a status to change it, also for an automatic maintenance.

## Edit or delete a maintenance

Point at a maintenance on the **Maintenance** tab. Select **Edit** to change the title, description, times, mode or components. You can change **Starts at** only before the maintenance starts. Edits do not email subscribers.

Select **Delete** to remove the maintenance. This is how you cancel it. Deleting does not email subscribers. To tell subscribers that you cancelled the work, post an incident or complete the maintenance instead.

## Component status during maintenance

From its start until it is completed, a maintenance puts its components in `under_maintenance`. An incident impact is worse than maintenance. If an incident affects the same component, the component shows the incident impact.

In the uptime bars, maintenance counts as up. It does not lower the uptime of a component.

## How visitors see maintenance

- **Before the start.** The page shows the maintenance with the time until it starts.
- **During the work.** The maintenance shows under **Happening now**, with the time remaining until the planned end. If the planned end has passed, the page shows **Running over**.
- **After the end.** The maintenance shows as completed, with how long the work took.

Each maintenance has its own page at `/maintenances/<id>`, with the window, the planned end, the components and the description.

To hide maintenance from the public page, clear **Scheduled maintenance** in **Settings → Display**.

## Subscriber emails

Spectate emails confirmed [subscribers](/status-pages/subscribers) at three moments:

| Event | Email |
|---|---|
| You schedule the maintenance | Scheduled maintenance |
| The maintenance starts | Maintenance in progress |
| The maintenance completes | Maintenance completed |

If you clear **Notify subscribers by email** when you schedule, Spectate does not send the "Scheduled maintenance" email. Automatic starts and ends always send an email. Edits and deletes never send an email.

## Feeds

The [RSS and Atom feeds](/status-pages/introduction#feeds) of the page contain scheduled, in progress and completed maintenance, together with the incidents. Spectate adds a maintenance to the feeds when you schedule it. Its place in the feed is the time you scheduled it, not its start time.

Each maintenance item has:

| Part | Content |
|---|---|
| Title | "Scheduled maintenance:" and the title of the maintenance |
| Link | The page of the maintenance, `/maintenances/<id>` |
| Content | The status, the window from **Starts at** to **Planned end**, the completion time, the affected components and the description |

Times in the feed are in UTC. When the status changes, the Atom entry gets a new `updated` time. The ID of the item does not change. To remove maintenance from the feeds, clear **Scheduled maintenance** in **Settings → Display**.

## Related

- [Components and their status](/status-pages/components)
- [Scheduled maintenance in the API reference](/api-reference/scheduled-maintenance)
