Using scheduler (RD Session Hosts)

The Scheduler tab in the RD Session Hosts view allows you to perform various commands 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, select the Scheduler tab.
  3. To create a new task, click Tasks > Add and select one of the following options:
    • Disable host
    • Disable hosts pool
    • Reboot host
    • Reboot host pool
    • Startup host*
    • Startup host pool*
    • Shutdown host pool
    • Shutdown host pool
    • Recreate host from template*
    • Recreate host pool from template*

*Only applies to hosts and host pools based on a template.

The RDSH Schedule Properties dialog opens. The dialog consists of three tabs, which are described below.

General

On the General tab, specify the following:

  • Select Enable Schedule to enable the scheduled task.
  • Specify the task name and an optional description.
  • In the Available list, select the target hosts and host pools and click Add (repeat to add more hosts or host pools). To add all servers, click Add all. To remove a server or servers from the Target list, click Remove or Remove all.

Trigger

On the Trigger tab, specify when the scheduled task should trigger:

  • In the Date, Start, and Duration fields, specify the start date, time, and duration.
  • (Reboot host pool only) In the Complete in field, specify the time to complete the task.
  • In the Recur field, specify the task recurrence. If you select Never, the task will still run as scheduled but only once. If you select On specific day(s) of the week, you need to select one or more days of the week.

Options

On the Options tab, you can do the following:

  • Compose a message that will be sent to users before or after (in certain scenarios) the scheduled task is triggered. Composing a message is described later in this subsection.
  • Specify additional options. Please note that the options are different depending on the task type, as described below.

If the task is Disable host or Disable host pool, the available options are:

  • On Disable: Use this option to specify how active sessions should be handled when the task is triggered. Please note that disabling a host pool with an assigned template will drain and remove RD Session Hosts from the host pool. See Maintaining RD Session Hosts based on a Template.
  • Enforce schedule for currently inactive RD Session Hosts: This option is only enabled when you have an active message in the list, which is displayed above these options. If the option is enabled, RD Session 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.

    If you enable this 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 Connection Broker).

If the task is Shutdown host or Shutdown host pool, the available options are:

  • Enforce schedule for currently inactive RD Session Hosts: This option is only enabled when you have an active message in the list, which is displayed above these options. If the option is enabled, RD Session 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.

    If you enable this 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 Connection Broker).

If a task is Reboot host, Reboot Host pool, Shutdown host, or Shutdown host pool the available options are:

  • Enable Drain Mode and Force server reboot after: The two options work together. If you enable the drain mode, the following will happen. When the task triggers, new connections to a server are refused, but active sessions 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 (see below for details). Please also see RD Session Host drain mode examples.
  • Enforce schedule for currently inactive RD Session Hosts: This option is enabled when the Enable Drain Mode option is selected. If the option is enabled, RD Session 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.

If the task is Startup host pool, the available options are:

  • Percentage of members: Select this option to specify the percentage of RD Session Hosts that must be started up in each host pool.
  • Specific number of members to be started: Select this option to specify the number of RD Session Hosts that must be started up in each host pool.

If the task is Recreate host from template or Recreate host pool from templatethe available options are:

  • Force host recreation after (for hosts) and Force host pool recreation after (for host pools): These options work together with the Enable Drain Mode option (see above). When the task triggers, new connections to a server are refused, but active sessions will continue to run and can be reconnected. The server will be recreated when all active users close their sessions or when the time specified by these options 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 (see below for details). Please also see RD Session Host drain mode examples.

To create a text message to be sent to users, click the Tasks > Add and specify the following:

  • Select the Enable Message option to enable the message. If the option is cleared, the message will still exist, but will not be sent to users. You can also enable or disable an existing message by selecting or clearing a checkbox in the list on the Options tab.
  • Specify the message title and body. This is what users will see when the message is displayed on their screens.
  • In the Send message drop-down list, select the time interval specifying when the message should be sent. By default, this is the time "before" the task is triggered. However, for Reboot Host and Reboot Host pool tasks, it can also be the time "after" the task is triggered, i.e. the server is put to drain mode. This may be specifically useful when you want to send multiple messages to users at different time intervals while the scheduled task is already in progress. See the explanation below.

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.

Was this topic helpful?