The scheduled task feature helps you simplify cloud desktop management, improve the end user experience in certain scenarios, and save on cloud desktop costs. This topic describes how to configure scheduled tasks.
Background information
Scheduled task types
The following table describes the types of scheduled tasks and their primary purposes.
Task type | Primary purpose |
Scheduled startup, shutdown, and restart | If cloud desktops are used during fixed periods, you can use scheduled startup, shutdown, and restart tasks to automate these operations. For pay-as-you-go cloud desktops, scheduled shutdowns can also help save costs. |
Scheduled reset | You can periodically reset the system disk of a cloud desktop to its initial state. This is common in education and training scenarios. |
Scheduled task for idle instances | When an end user is connected to a cloud desktop but there is no activity, you can assume the user is not actively using it. After you configure a scheduled task for idle instances, the cloud desktop automatically shuts down or hibernates when the idle duration reaches the specified time. For pay-as-you-go cloud desktops, this can effectively save costs. |
Scheduled task for disconnected instances | For pay-as-you-go cloud desktops, billing continues as long as the cloud desktop is running, regardless of whether an end user is connected. Charges still apply if the cloud desktop is not shut down after a disconnection. To prevent unexpected costs from forgetting to shut down, you can set a scheduled task to automatically shut down or hibernate the cloud desktop after it has been disconnected for a specified period. |
Scope of support
Scheduled tasks for idle instances are supported only for cloud desktops that meet one of the following conditions:
Windows cloud desktops that use the Adaptive Streaming Protocol (ASP) and have an image version of 1.0.4 or later.
Linux cloud desktops that use ASP and have an image version of 2.0.0 or later.
Limits
You can create a maximum of 20 scheduled tasks.
Create a scheduled task
Log on to the Elastic Desktop Service Enterprise console.
In the left-side navigation pane, choose .
On the Scheduled Tasks page, click Create Scheduled Task.
On the Create Scheduled Task page, complete the following configurations.
Configuration item
Description
Basic Information
Scheduled Task Name
A custom name. The name must be 2 to 128 characters in length. It must start with an uppercase letter, a lowercase letter, or a Chinese character. It cannot start with
http://orhttps://. It can contain digits, colons (:), underscores (_), or hyphens (-).Description
A description of the scheduled task. The description must be 2 to 256 characters in length. It cannot start with
http://orhttps://. It can contain digits, punctuation marks, and spaces. Press the Enter key for a line break.Scheduled Start
Scheduled Start
If you enable this feature, you must specify an execution cycle and time.
Cycle
Select the days of the week on which to run the task.
Start At
Select the specific time to run the task.
Cloud Computer Wake-up
If enabled, the cloud desktop is woken up from hibernation when the scheduled startup task runs.
Scheduled Stop
Scheduled Stop
If you enable this feature, you must specify an execution cycle and time.
Cycle
Select the days of the week on which to run the task.
Stop At
Select the specific time to run the task.
Forcibly Execute
By default, if a user is connected to the cloud desktop or the cloud desktop is in hibernation when the scheduled time is reached, the task is not executed to ensure a good user experience. The task is postponed to the next scheduled time, at which the same check is performed. To ignore this condition, enable this feature.
Scheduled Restart
Scheduled Restart
If you enable this feature, you must specify an execution cycle and time.
Cycle
Select the days of the week on which to run the task.
Restart At
Select the specific time to run the task.
Forcibly Execute
By default, if a user is connected to the cloud desktop or the cloud desktop is in hibernation when the scheduled time is reached, the task is not executed to ensure a good user experience. The task is postponed to the next scheduled time, at which the same check is performed. To ignore this condition, enable this feature.
Scheduled Reset
Scheduled Reset
Specifies whether to schedule a reset for the cloud desktop. A reset initializes the system disk (drive C by default) of the cloud desktop based on its currently associated image. After the reset, installed software and personal data on the system disk are removed. Data on the data disk (drive D by default) remains unchanged.
If you enable this feature, you must specify an execution cycle and time.
Cycle
Select the days of the week on which to run the task.
Reset At
Select the specific time to run the task.
Forcibly Execute
By default, if a user is connected to the cloud desktop or the cloud desktop is in hibernation when the scheduled time is reached, the task is not executed to ensure a good user experience. The task is postponed to the next scheduled time, at which the same check is performed. To ignore this condition, enable this feature.
Initialize Data Disk
If you select this option, the data disk is also initialized when the system disk is reset.
ImportantIf the cloud desktop contains important files and data, make sure to back them up in advance.
Scheduled Task upon Inactivity
Scheduled Task upon Inactivity
Specifies whether to run a task after the cloud desktop has been idle for a specified period. The criteria for determining idleness depend on the judgment type you select.
Determine
Select the criteria for determining idleness:
Based on keyboard and mouse activity
The scheduled task for idle instances is triggered if no keyboard or mouse activity is detected, even when automation programs are running, videos are playing, or video conferences are in progress.
Smart judgment
The scheduled task for idle instances is triggered when no keyboard and mouse activity, audio or video conferencing, or file uploads and downloads are detected.
NoteTo use this judgment type, make sure the cloud desktop image is updated to version 2.5.0 or later.
Whitelist
After you enable the scheduled task for idle instances, you can add specific applications to a process whitelist. This stops the scheduled task from running while these applications are active. If the cloud desktop detects that a whitelisted process is running, the scheduled task is temporarily disabled until the process ends.
NoteTo use this feature, make sure the cloud desktop image is updated to version 2.6.0 or later.
For example, to temporarily stop the scheduled task while Google Chrome is running, add it to the process whitelist as follows:
Find the process name of the target application, in the format of <process>.exe, such as chrome.exe.
If you do not know the process name, open the Windows Task Manager. On the Processes tab, find the application by name, right-click it, and select Go To Details to see the corresponding process name.
Click Add Process.
In the Add Process dialog box, enter the target process name without the
.exesuffix, and click OK.
If end users do not perform any<Duration>
The duration for which the user is idle on the cloud desktop.
Then the cloud computer <Task Type> Tasks
The operation to perform on the cloud desktop after the specified idle duration is reached. You can select Stopped, Restarted, Hibernated, or Disconnected.
ImportantIf you select Stopped or Restarted, unsaved data on the cloud desktop will be lost after the operation.
Scheduled Task upon Disconnection
Scheduled Task upon Disconnection
Specifies whether to run a task after the cloud desktop has been disconnected for a specified period.
Effective Rule
Task Configured by End User: The settings configured by the end user on the client take effect. For information about how end users set a scheduled disconnection task, see Configure a scheduled policy for a cloud computer.
Task Configured by Administrator: The settings that you configure in the console take effect. End users cannot change the settings. If you select this option, configure the disconnection duration and the scheduled task type.
When a cloud computer has been disconnected for <Duration>
The duration after the cloud desktop is disconnected.
Then the cloud computer executes <Task Type> Tasks
The operation to perform on the cloud desktop after the specified disconnection duration is reached. You can select Stopped or Hibernated.
If a cloud desktop associated with the scheduled task does not support hibernation, the automatic hibernation task is replaced with an automatic shutdown task.
ImportantIf you select Shutdown, unsaved data on the cloud desktop will be lost after the shutdown.
Scheduled Disconnect Task
Scheduled Disconnect Task
When this task starts, the cloud desktop automatically switches to maintenance mode, and end users cannot connect to it.
NoteThe cloud desktop automatically exits maintenance mode after the specified period. End users can then connect as normal.
Execution Time Zone
The time zone in which the scheduled task is triggered.
Cycle
Select the days of the week on which to run the task.
Execution Time
The time period during which the scheduled maintenance task is effective.
Forcibly Execute
If enabled, the system forcibly disconnects any connected end users when the task starts. The cloud desktop then switches to maintenance mode and denies new connection requests.
After you complete the configuration, click Confirm at the bottom of the page.
Associate scheduled tasks with resources
A scheduled task must be associated with a cloud desktop or a resource group to take effect.
Associate resources with a scheduled task
Log on to the Elastic Desktop Service Enterprise console.
In the left-side navigation pane, choose .
On the Scheduled Tasks page, find the target scheduled task and click Associated Resources in the Actions column.
In the Associated Resources panel, you can associate resources by cloud desktop or resource group:
On the View Cloud Computers tab, click Associate Cloud Computer. In the Associate Cloud Computer dialog box, select one or more cloud desktops and click OK.
On the Associated Resource Groups tab, click Associate Resource Group. In the Associate Resource Group dialog box, select one or more resource groups and click OK.
NoteIf you associate a resource group with a scheduled task, the task takes effect for all cloud desktops in that resource group. This action overrides any scheduled tasks that are associated with individual cloud desktops in that group.
Associate a scheduled task with a cloud desktop
Log on to the Elastic Desktop Service Enterprise console.
In the left-side navigation pane, choose .
In the upper-left corner of the top navigation bar, select a region.
On the Cloud Computers page, click the ID of the target cloud desktop.
On the cloud desktop details page, click the Scheduled Tasks tab, and then click Associate with Scheduled Task.
In the Associate with Scheduled Task panel, select a scheduled task and click OK.
Associate a scheduled task with a resource group
After you associate a scheduled task with a resource group, this task applies to all cloud computers within the resource group. The scheduled task previously associated with these cloud computers will expire.
Log on to the Elastic Desktop Service Enterprise console.
In the left-side navigation pane, choose
On the Resource Groups page, find the resource group with which you want to associate a scheduled task and click the ⋮ icon in the Actions column. Then, click Associate with Scheduled Task.
In the Associate with Scheduled Task panel, select a scheduled task that you want to use and click Confirm.
Change the scheduled task associated with a resource
Change the scheduled task for a cloud desktop
Log on to the Elastic Desktop Service Enterprise console.
In the left-side navigation pane, choose .
In the upper-left corner of the top navigation bar, select a region.
On the Cloud Computers page, perform the following operations as needed.
Single operation
On the cloud desktop list page
Find the target cloud desktop, click Change Scheduled Task in the Actions column.
In the Change Scheduled Task panel, you can view the details of the scheduled task that is associated with the cloud desktop.
To remove the scheduled task, click Disassociate at the bottom of the panel.
To change the scheduled task, go to the page.
On the cloud desktop details page
Click the ID of the target cloud desktop.
On the cloud desktop details page, click the Scheduled Tasks tab.
To the right of Scheduled Task ID, click Change Scheduled Task.
In the Change Scheduled Task panel, select a new scheduled task and click OK.
Batch operation
Select the target cloud desktops, and at the bottom of the page, choose .
In the Change Scheduled Task panel, perform the following operations as needed:
To change to a different scheduled task: In the Set Scheduled Task section, select Bind Scheduled Task, select a task from the table, and click OK.
To unbind the scheduled task: In the Set Scheduled Task section, select Unbind and click OK.
Change the scheduled task for a resource group
Log on to the Elastic Desktop Service Enterprise console.
In the left-side navigation pane, choose
On the Resource Groups page, find the resource group with which you want to associate a scheduled task and click the ⋮ icon in the Actions column. Then, click Associate with Scheduled Task.
In the Associate with Scheduled Task panel, select a scheduled task that you want to use and click Confirm.
What to do next
Log on to the Elastic Desktop Service Enterprise console.
In the left-side navigation pane, choose .
On the Scheduled Tasks page, find the target scheduled task and perform the following operations as needed:
View execution records: In the Actions column, click View Execution Records. On the execution records tab, you can view the execution records of the task.
NoteYou can view the execution history of scheduled tasks for the last 30 days.
Modify the task configuration: In the Actions column, click Modify. Edit the task configuration and click OK.
Delete the task: In the Actions column, click Delete. In the confirmation dialog box, click Confirm.