

# Schedule virtual desktops
<a name="schedule-virtual-desktops"></a>

By default, virtual desktops are scheduled to automatically stop on Saturdays and Sundays. Schedules on individual desktops can be adjusted using the Schedule windows accessed from the **Actions** menu on individual desktops as shown in the next section. To learn more about [Set default schedules across the entire environment](setting-default-schedules.md) see that section. Desktops can also stop if idle to help reduce costs. See [Virtual desktop infrastructure autostop](virtual-desktops-autostop.md) to learn more about VDI Autostop.

**Topics**
+ [Set individual desktop schedules](schedule-individual-desktops.md)
+ [Set default schedules across the entire environment](setting-default-schedules.md)
+ [Reset schedule to default](reset-schedule-to-default.md)

# Set individual desktop schedules
<a name="schedule-individual-desktops"></a>

1. Choose **Actions**.   
![\[Virtual desktops\]](http://docs.aws.amazon.com/res/latest/ug/images/res-virtualdesktops.png)

1. Choose **Schedule**. 

1. Set your schedule for each day.

1. Choose **Save**.   
![\[Schedule desktop sessions\]](http://docs.aws.amazon.com/res/latest/ug/images/res-sessionschedule.jpg)

# Set default schedules across the entire environment
<a name="setting-default-schedules"></a>

The default schedule can be updated in [DynamoDB ](https://console.aws.amazon.com/dynamodbv2):

1. Search for your environment's cluster settings table: `<env-name>.cluster-settings`.

1. Select **Explore Items**.

1. Under **Filters** enter the following two filters:

   Filter 1 
   + **Attribute name** = **key**
   + **Condition** = **Contains**
   + **Type** = **String**
   + **Value** = **vdc.dcv\$1session.schedule**

   Filter 2 
   + **Attribute name** = **key**
   + **Condition** = **Contains**
   + **Type** = **String**
   + **Value** = **type**  
![\[Filters display with option to add filters\]](http://docs.aws.amazon.com/res/latest/ug/images/vdi-default-schedule-filter-keys.PNG)

   This will display seven entries which represent the default schedule types for each day of the form `vdc.dcv_session.schedule.<day>.type`. The valid values are:
   + `NO_SCHEDULE`
   + `STOP_ALL_DAY`
   + `START_ALL_DAY`
   + `WORKING_HOURS`
   + `CUSTOM_SCHEDULE`

1. If `CUSTOM_SCHEDULE` is set, you must provide the customized start and stop times. To do this, use the following filter in the cluster-settings table:
   + **Attribute name** = **key**
   + **Condition** = **Contains**
   + **Type** = **String**
   + **Value** = **vdc.dcv\$1session.schedule**

1. Search for the item formatted as `vdc.dcv_session.schedule.<day>.start_up_time` and `vdc.dcv_session.schedule.<day>.shut_down_time` for the respective days you want to set your custom schedule. Inside the item, delete the Null entry and replace it with a String entry as follows:
   + **Attribute name** = **value**
   + **Value** = ***<The time>***
   + **Type** = **String**

   The time value must be formatted as XX:XX using a 24 hour clock. For example, 9am would be 09:00 while 5pm would be 17:00. The entered time always corresponds to the local time of the AWS region the RES environment is deployed in. 

# Reset schedule to default
<a name="reset-schedule-to-default"></a>

If you have customized the schedule for a virtual desktop, you can reset it back to the system default schedule set by your administrator.

1. Select the virtual desktop session you want to reset.

1. Choose **Actions** > **Schedule**.  
![\[Actions menu with Schedule option\]](http://docs.aws.amazon.com/res/latest/ug/images/virtual-desktop-options.png)

1. Click **Reset**.  
![\[Schedule dialog with Reset option\]](http://docs.aws.amazon.com/res/latest/ug/images/reset-schedules.png)

1. Choose **Save**.