# Using scheduler (VDI)

The **Scheduler** tab allows you to create scheduler tasks that will be performed on individual hosts or host pools at a specified time.

{% hint style="info" %}
**Note:** When the scheduled event is triggered, affected hosts are disabled in Parallels RAS and their status is displayed as "Disabled (scheduler)" or "Pending reboot (scheduler)". You can cancel these states by right-clicking a host on the **Hosts** tab and choosing **Control** > **Cancel disabled state (scheduler)** or **Control** > **Cancel pending reboot (scheduler)**.
{% endhint %}

## **Disabling hosts and hosts in pools**

To disable a host or a host in a pool:

1. Click **Tasks** > **Add** > **Disable host** or **Disable host pool**.
2. On the **General** tab, select the **Enable Schedule** option.
3. Specify a name for this schedule and an optional description.
4. Select a host or a pool in the **Available** list and click **Add**. The host or pool will appear in the **Target** list.
5. Select the **Trigger** tab and specify start date and time, duration, and recurrence settings for this event. To make this a one-time event, select **Never** in the **Recur** drop-down list.
6. Select the **Options** tab. It contains the following options:
   * Message list: Configure a message that will be sent to users before the host goes offline. Click **Tasks** > **Add** and specify the message title, body, and the time period when it should be sent.
   * **On disable**: Specify what should happen to current sessions when a scheduled task triggers. Select the desired option from the **On disable** drop-down list.
   * **Enforce schedule for currently inactive hosts**: This option is only enabled when you have an active message in the list. If the option is enabled, hosts that are currently offline are also monitored, and if such a server comes back online during the scheduled task execution, the task is applied to it too.
7. Click **OK** to save the schedule.

## **Rebooting hosts and hosts in pools**

To reboot a host or a host in a pool:

1. Click **Tasks** > **Add** > **Reboot host** or **Reboot host pool**.
2. On the **General** tab, select the **Enable Schedule** option.
3. Specify a name for this schedule and an optional description.
4. Select a host or a pool in the **Available** list and click **Add**. The host or pool will appear in the **Target** list.
5. Select the **Trigger** tab and specify start date, time, and recurrence settings for this event. To make this a one-time event, select **Never** in the **Recur** drop-down list. In addition, specify the following options for the "Reboot host pool" task:
   * **Complete in**: Specify the time to complete the task.
6. Select the **Options** tab. It contains the following options:
   * Message list: Configure a message that will be sent to users before the host is rebooted. Click **Tasks** > **Add** and specify the message title, body, and the time period when it should be sent.
   * **Enable Drain Mode** and **Force server reboot after**: The two options work together. If you select the **Enable Drain Mode** option, then when the task triggers, new connections to a host are refused but active connections will continue to run and can be reconnected. The server will be rebooted when all active users close their sessions or when **Force server reboot after** time is reached, whichever comes first. For active users not to lose their work, create a message that will advise them to save their work and log off.
   * **Enforce schedule for currently inactive hosts**: This option is only enabled when you have an active message in the list. If the option is enabled, hosts that are currently offline are also monitored, and if such a server comes back online during the scheduled task execution, the task is applied to it too.
7. Click **OK** to save the schedule.

## **Starting up hosts and hosts in pools**

{% hint style="info" %}
**Note**: This task applies only to hosts and host pools based on a template.
{% endhint %}

To start up a host or a host in a pool:

1. Click **Tasks** > **Add** > **Startup host** or **Startup host pool**.
2. On the **General** tab, select the **Enable Schedule** option.
3. Specify a name for this schedule and an optional description.
4. Select a host or a pool in the **Available** list and click **Add**. The host or pool will appear in the **Target** list.
5. Select the **Trigger** tab and specify start date, time, and recurrence settings for this event. To make this a one-time event, select **Never** in the **Recur** drop-down list.
6. ("Startup host pool" task only) Select the **Options** tab. It contains the following options:
   * **Power on all members:** Select this option to start up all hosts assigned to specific users.
   * **Percentage of members**: Select this option to specify the percentage of hosts that must be started up in each pool.
   * **Specific number of members to be started**: Select this option to specify the number of hosts that must be started up in each pool.
7. Click **OK** to save the schedule.

## **Shutting down hosts and hosts in pools**

To shut down a host or a host in a pool:

1. Click **Tasks** > **Add** > **Shutdown host** or **Shutdown host pool**.
2. On the **General** tab, select the **Enable Schedule** option.
3. Specify a name for this schedule and an optional description.
4. Select a host or a pool in the **Available** list and click **Add**. The host or pool will appear in the **Target** list.
5. Select the **Trigger** tab and specify start date, time, and recurrence settings for this event. To make this a one-time event, select **Never** in the **Recur** drop-down list.
6. Select the **Options** tab. It contains the following options:
   * Message list: Configure a message that will be sent to users before the host is rebooted. Click **Tasks** > **Add** and specify the message title, body, and the time period when it should be sent.
   * **Enable Drain Mode** and **Force server shutdown after**: The two options work together. If you select the **Enable Drain Mode** option, then when the task triggers, new connections to a host are refused but active connections will continue to run. The server will be shut down when all active users close their sessions or when **Force server reboot after** time is reached, whichever comes first. For active users not to lose their work, create a message that will advise them to save their work and log off.
   * **Enforce schedule for currently inactive hosts**: This option is only enabled when you have an active message in the list. If the option is enabled, hosts that are currently offline are also monitored, and if such a server comes back online during the scheduled task execution, the task is applied to it too.

## **Recreating hosts and host pools**

{% hint style="info" %}
**Note**: This task applies only to hosts and host pools based on a template.
{% endhint %}

To recreate a specific host or all hosts in a host pool:

1. Click **Tasks** > **Add** > **Recreate host from template** or **Recreate host pool from template**.
2. On the **General** tab, select the **Enable Schedule** option.
3. Specify a name for this schedule and an optional description.
4. Select a host or a pool in the **Available** list and click **Add**. The host or pool will appear in the **Target** list.
5. Select the **Trigger** tab and specify start date, time, and recurrence settings for this event. To make this a one-time event, select **Never** in the **Recur** drop-down list.
6. Select the **Options** tab. It contains the following options:
   * Message list: Configure a message that will be sent to users before the host is rebooted. Click **Tasks** > **Add** and specify the message title, body, and the time period when it should be sent.
   * **Enable Drain Mode**, **Force host recreation after**, and **Force host pool recreation after**: The options work together. If you select the **Enable Drain Mode** option, then when the task triggers, new connections to a host are refused but active connections will continue to run. The server will be recreated when all active users close their sessions or when the time specified in **Force host recreation after** or **Force host pool recreation after** is reached, whichever comes first. For active users not to lose their work, create a message that will advise them to save their work and log off.
   * **Enforce schedule for currently inactive hosts**: This option is only enabled when you have an active message in the list. If the option is enabled, hosts that are currently offline are also monitored, and if such a server comes back online during the scheduled task execution, the task is applied to it too.

## **Sending multiple messages to users**

For **Disable Host** and **Disable Host Pool** tasks, you can only send a message before the scheduled task is triggered. Hence, when creating a message, you can only select the "before" option when specifying when the message should be sent. You can create more than one message if needed and send them at different time intervals, so the users are notified more than once before the task executes.

For **Reboot Host** and **Reboot Host pool** tasks, you can send a message before or after the scheduled task is triggered. The "after" option is available for these tasks because you have the ability to enable the drain mode, which will keep the active sessions running for some time. During this time, you can send multiple messages to active users reminding them that they should finish their work and close their sessions. To use the "after" option, the **Enable Drain Mode** option must be selected. Please also note that the "after" time interval and the **Force server reboot after** setting should be coordinated. For example, if the force reboot occurs before the "after" time elapses, active users will not have a chance to see the message.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.parallels.com/landing/ras-admin-guide/v20-en-us/parallels-ras-20-administrators-guide/virtual-desktop-infrastructure-vdi/manage-vdi/using-scheduler-vdi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
