> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vast.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# vastai schedule maint

> Host command

Schedule upcoming maint window

<Note>This is a **host** command, used for managing machines you are renting out on Vast.ai.</Note>

## Usage

```bash theme={null}
vastai schedule maintenance id [--sdate START_DATE --duration DURATION --maintenance_category MAINTENANCE_CATEGORY]
```

## Arguments

<ParamField path="id" type="integer" required>
  id of machine to schedule maintenance for
</ParamField>

## Options

<ParamField path="--sdate" type="number">
  maintenance start date in unix epoch time (UTC seconds)
</ParamField>

<ParamField path="--duration" type="number">
  maintenance duration in hours
</ParamField>

<ParamField path="--maintenance_category" type="string" default="not provided">
  (optional) can be one of \[power, internet, disk, gpu, software, other]
</ParamField>

## Description

The proper way to perform maintenance on your machine is to wait until all active contracts have expired or the machine is vacant.
For unplanned or unscheduled maintenance, use this schedule maint command. That will notify the client that you have to take the machine down and that they should save their work.
You can specify a date, duration, reason and category for the maintenance.

Example: vastai schedule maint 8207 `--sdate` 1677562671 `--duration` 0.5 `--maintenance_category` "power"

## Examples

```bash theme={null}
vastai schedule maint <ID>
```

## Global Options

The following options are available for all commands:

| Option          | Description                                           |
| --------------- | ----------------------------------------------------- |
| `--url URL`     | Server REST API URL                                   |
| `--retry N`     | Retry limit                                           |
| `--raw`         | Output machine-readable JSON                          |
| `--explain`     | Verbose explanation of API calls                      |
| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) |
