---
title: "corestack_maintenance_window_set"
url: https://docs.corefinity.com/mcp/tools/corestack_maintenance_window_set
type: tool
last_updated: 2026-11-13
feature: maintenance-windows
related:
  - https://docs.corefinity.com/api/reference/site-settings/update-site-maintenance-window.md
  - https://docs.corefinity.com/guides/sites/site-settings/maintenance-window.md
---
# corestack_maintenance_window_set

**Set a site's maintenance window.** Sets a site's own maintenance window, for every environment of the site. Answers the new window and restamped: the queued maintenance it moved (never into the next 30 minutes). Scope: write.

- Scope: `write`
- Runs as a task: no

## When to use it

Set the hour a site's own maintenance window starts. The window always lasts 4 hours, UK time, and applies to every environment of the site. Queued maintenance moves to the new window (`restamped` counts it; never into the next 30 minutes). Preview first with corestack_maintenance_window_get `preview_start_hour`.

## Inputs

- `site_id` (integer, required): the site (not an environment row).
- `start_hour` (integer 0–23, required).

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "site_id": {
      "minimum": 1,
      "type": "integer"
    },
    "start_hour": {
      "description": "The hour the 4-hour window starts, UK time (0–23).",
      "maximum": 23,
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "site_id",
    "start_hour"
  ],
  "type": "object"
}
```

## Refusals

- `managed_elsewhere` (message: "This site is managed by another control panel"): another control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done.
- The refusals every tool can answer: `invalid_arguments`, `tenant_mismatch`, `scope_required`, `pin_refused`, `rate_limited`, `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).
- `window_scope_unavailable`: an environment row; environments use their website's window.
- `batch_applying`: maintenance is running on one of the site's rows now; try again when it has finished.
- `window_locked`: Corefinity set this window (it cannot be changed here; ask support).
- `throttled`: too many window changes in the last hour; try again later (`retry_after_seconds` when known).

## Example

```json
{
  "name": "corestack_maintenance_window_set",
  "arguments": {
    "site_id": 74,
    "start_hour": 10
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_maintenance_window_set with site_id 74, start_hour 10. (Set a site's maintenance window.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [PUT /api/corestack/sites/{site}/maintenance-window](https://docs.corefinity.com/api/reference/site-settings/update-site-maintenance-window.md)
- Guide: [Maintenance window](https://docs.corefinity.com/guides/sites/site-settings/maintenance-window.md)
