# Maintenance Mode

> Maintenance Mode provides a simplified and pain-free solution for stopping all Orchestrator activity and shutting down IIS when needed, such as undertaking [maintenance](https://docs.uipath.com/orchestrator/standalone/2022.4/installation-guide/is-maintenance-considerations) or [upgrading](https://docs.uipath.com/orchestrator/standalone/2022.4/installation-guide/about-updating-and-migrating) your Orchestrator instance. This is useful for all installations, but especially for large deployments with numerous active schedules and many jobs processing at all times.

Maintenance Mode provides a simplified and pain-free solution for stopping all Orchestrator activity and shutting down IIS when needed, such as undertaking [maintenance](https://docs.uipath.com/orchestrator/standalone/2022.4/installation-guide/is-maintenance-considerations) or [upgrading](https://docs.uipath.com/orchestrator/standalone/2022.4/installation-guide/about-updating-and-migrating) your Orchestrator instance. This is useful for all installations, but especially for large deployments with numerous active schedules and many jobs processing at all times.

:::note
Maintenance Mode is only available to the `host` organization, and is accessible only via Orchestrator's API. For details, refer to the [Orchestrator API Reference](https://docs.uipath.com/orchestrator/standalone/2022.4/api-guide/getting-started).
:::

To use Maintenance Mode:

1. Enable **Pending Maintenance** mode using the `/api/Maintenance/Start` call and selecting **Draining** as the **phase** parameter. During this time:
   * Robot communication with Orchestrator is still active (i.e. logs are uploaded, queue items are added);
   * No new jobs can be created;
   * A `Stop` command is sent to all running jobs;
   * All schedules are paused;
   * The Orchestrator interface is unavailable to everyone during maintenance.
     :::note
     If any jobs do not complete, or are too lengthy to wait, you have the ability to send a `Kill` command for all remaining jobs using the `killJobs` parameter.
     :::
2. When all running jobs have stopped, enable Maintenance Mode using the `/api/Maintenance/Start` call and selecting **Suspended** as the **phase** parameter. During this time all Robot to Orchestrator communication is stopped.
3. You can now shut down IIS and proceed with any maintenance or update actions needed. Maintenance Mode will persist through any stop, restart, or upgrade operation until manually switched off.
4. Restart IIS and Orchestrator when all maintenance actions have been completed.
5. End Maintenance Mode using the `/api/Maintenance/End` endpoint:
   1. Navigate to `https://<orchestrator-url>/identity` and sign in with your host administrator account.
   2. Open the Orchestrator Swagger page and select **Authorize** to authenticate with the same host admin account.
   3. Use the `/api/Maintenance/End` endpoint to turn off Maintenance Mode.
   * All job executions scheduled to run during the maintenance mode are skipped;
   * A maintenance log is created for each tenant. The log summarizes all stopped/killed jobs and skipped trigger executions.
     :::note
     This log is only accessible at the tenant level using the `api/Maintenance/Get` call and contains only those job and schedule details specific to that tenant.
     :::
