Skip to main content
Schedule an upcoming maintenance window
This is a host command, used for managing machines you are renting out on Vast.ai. First time? Install the CLI via CLI hello world, then confirm with vastai --help.

Usage

schedule maintenance is an alias for schedule maint if your CLI build supports both spellings. Prefer maint. Requires machine_write on scoped API keys — see Permissions.

Arguments

integer
required
ID of the machine to schedule maintenance for.

Options

number
Maintenance start time as Unix epoch seconds (UTC). Example: 1677562671. The API receives an ISO 8601 UTC datetime after conversion.
number
Maintenance duration in hours. Prefer whole hours for REST compatibility (OpenAPI duration is an integer). The CLI may accept fractional values (for example 0.5).
string
default:"not provided"
(optional) can be one of [power, internet, disk, gpu, software, other]
Optional REST body field maintenance_reason (short description for notifications) is available on Schedule Maintenance. The published CLI does not yet expose a --maintenance_reason flag.

Description

The lowest-risk path is to wait until all active contracts have expired or the machine is vacant, then take the machine offline. The same schedule maint command is used for both planned and emergency downtime — advance notice and duration determine SLA credit eligibility, not the category value.

Planned SLA maintenance

If SLA is enabled and you need planned downtime during an active rental, schedule at least 24 hours in advance. See SLA Offers → Scheduled maintenance.

Emergency or unplanned maintenance

If the machine must go offline without adequate notice, still run schedule maint to notify renters — but expect full SLA settlement exposure when SLA is enabled. Use the current UTC epoch for --sdate and an integer --duration (hours):
To cancel a scheduled window, use vastai cancel maint. To reschedule, cancel first, then schedule a new window (≥24 hours ahead for planned SLA credit review). Across many machines, schedule sequentially and back off on HTTP 429.

Examples

Global Options

The following options are available for all commands: