Previous page

Next page

Locate page in Contents

Using Scheduler

The Scheduler tab page in the RD Session Hosts view allows you to reboot or temporarily disable servers according to a schedule.

To create a new scheduler task or modify an existing one:

  1. In the RAS Console, navigate to Farm / <site> / RD Session Hosts.
  2. In the right pane, click the Scheduler tab.
  3. To create a new task, click Add in the Tasks drop-down menu and select a desired task from the following options:
    • Disable Server
    • Disable Server Group
    • Reboot Server
    • Reboot Server Group

The RDSH Schedule Properties dialog opens. In the dialog, specify the following properties:

  • Select Enable Schedule to enable the task.
  • Specify the task name, target server (or server group if you've selected a group task), and an optional description.
  • Specify the start date and time, duration, and scope (the Repeat property). If you select Never in the Repeat drop-down box, the task will run only once.
  • The Notify Users Message section allows you to type a message that will be sent to the users before the task is executed (you can select the time period using the Send message [ ] before action is triggered drop-down list).

The Options section will have different options depending on the task type:

  • If a task is Disable Server or Disable Server Group, the available options are On Disable and Enforce schedule for currently inactive RD Session Hosts. Use the On Disable option to specify how the active session states should be handled. Please note that disabling a server group with assigned template will drain and remove RD Session Hosts based on the template from group. See Maintaining RD Session Hosts based on a RAS Template.

    If you enable the Enforce schedule for currently inactive RD Session Hosts option, the schedule will be applied to a currently inactive RD Session Host when it comes back online. If the option is disabled (default), the schedule will have no effect on such servers. Note that it is assumed that a server is inactive (offline) if it is disabled or cannot be reached over the network (registered on RAS Publishing Agent).

  • If a task is Reboot Server or Reboot Server Group, the available options are Enable Drain Mode and Force server reboot after (the options work together). If you enable the drain mode, the following will happen. When the task triggers, new connections to a server will be refused but active connections will continue to run. A server will be rebooted when all active users end their sessions or when it's time to force reboot it, whichever comes first. For active users not to lose their work, specify a message in the Notify Users Message box advising them to save their work and log off. Please also see the RD Session Host drain mode examples subsection below.

When done, click OK to save the changes and close the dialog.

To modify an existing task, right-click it and select Properties in the context menu. To delete a task, right-click it and select Delete.

RD Session Host drain mode examples

Example 1: Scheduling a server group for reboot without the drain mode

A server group contains 3 servers: A, B, C

  • Date: 6/24/2018
  • Start Time: 10:45am
  • Send Message: 2 minutes before

Users with active sessions are notified 2 minutes before the server rebooting task is triggered.

Example 2: Scheduling a server group for reboot with the drain mode enabled

A server group containing 3 servers: A, B, C

  • Date: 6/24/2018
  • Start Time: 10:45am
  • Drain mode: enabled
  • Force reboot after: 3 hours
  • Send Message: 2 minutes before

The session users are notified 2 minutes before the server rebooting task is triggered.

When the task is triggered:

  1. The drain mode is enabled on the servers.
  2. Servers A and B have no active or disconnected sessions, so they are restarted immediately.
  3. Server C still has open/disconnected sessions, so it continues to run until all users end their sessions. If in three hours the server still has active sessions, they are terminated and the server is restarted.

Maintaining RD Session Hosts based on a RAS Template

If you need to do a scheduled maintenance of RD Session Hosts that were created from a RAS Template, please follow these steps:

  1. Create a schedule that fits your maintenance window to drain a desired RD Session Host group.
  2. During maintenance (or right before it) switch the template into maintenance mode. Then apply the necessary changes.
  3. The schedule disables groups provisioned by the template (while the maintenance window lasts) which leads to removing (unassigning) all guest VMs from them.
  4. Release the template from maintenance and click Yes when asked whether to recreate all clones.
  5. Enable groups which were disabled in step 3 (above). At this point, the groups will begin receiving guest VMs to comply with Keep Available Buffer setting
  6. From this point forward, groups are provisioned with VMs on demand.