Skip to content

Commit 06f519d

Browse files
deansheatherbpmct
andauthored
docs: add template autostop requirement docs (#11235)
* chore: template autostop requirement docs * fixup! chore: template autostop requirement docs * fixes from feedback. * fmt --------- Co-authored-by: Ben <me@bpmct.net>
1 parent 30afe43 commit 06f519d

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed

docs/images/user-quiet-hours.png

138 KB
Loading

docs/workspaces.md

+59-1
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,71 @@ coder_app.
7474

7575
![Autostop UI](./images/autostop.png)
7676

77-
### Max lifetime (Enterprise)
77+
### Max lifetime (Deprecated, Enterprise)
7878

7979
Max lifetime is a template setting that determines the number of hours a
8080
workspace will run before Coder automatically stops it, regardless of any active
8181
connections. Use this setting to ensure that workspaces do not run in perpetuity
8282
when connections are left open inadvertently.
8383

84+
Max lifetime is deprecated in favor of template autostop requirements. Templates
85+
can choose to use a max lifetime or an autostop requirement during the
86+
deprecation period, but only one can be used at a time. Coder recommends using
87+
autostop requirements instead as they avoid restarts during work hours.
88+
89+
### Autostop requirement (Enterprise)
90+
91+
Autostop requirement is a template setting that determines how often workspaces
92+
using the template must automatically stop. Autostop requirement ignores any
93+
active connections, and ensures that workspaces do not run in perpetuity when
94+
connections are left open inadvertently.
95+
96+
Workspaces will apply the template autostop requirement on the given day in the
97+
user's timezone and specified quiet hours (see below). This ensures that
98+
workspaces will not be stopped during work hours.
99+
100+
The available options are "Days", which can be set to "Daily", "Saturday" or
101+
"Sunday", and "Weeks", which can be set to any number from 1 to 16.
102+
103+
"Days" governs which days of the week workspaces must stop. If you select
104+
"daily", workspaces must be automatically stopped every day at the start of the
105+
user's defined quiet hours. When using "Saturday" or "Sunday", workspaces will
106+
be automatically stopped on Saturday or Sunday in the user's timezone and quiet
107+
hours.
108+
109+
"Weeks" determines how many weeks between required stops. It cannot be changed
110+
from the default of 1 if you have selected "Daily" for "Days". When using a
111+
value greater than 1, workspaces will be automatically stopped every N weeks on
112+
the day specified by "Days" and the user's quiet hours. The autostop week is
113+
synchronized for all workspaces on the same template.
114+
115+
Autostop requirement is disabled when the template is using the deprecated max
116+
lifetime feature. Templates can choose to use a max lifetime or an autostop
117+
requirement during the deprecation period, but only one can be used at a time.
118+
119+
#### User quiet hours (Enterprise)
120+
121+
User quiet hours can be configured in the user's schedule settings page.
122+
Workspaces on templates with an autostop requirement will only be forcibly
123+
stopped due to the policy at the start of the user's quiet hours.
124+
125+
![User schedule settings](./images/user-quiet-hours.png)
126+
127+
Admins can define the default quiet hours for all users with the
128+
`--default-quiet-hours-schedule` flag or `CODER_DEFAULT_QUIET_HOURS_SCHEDULE`
129+
environment variable. The value should be a cron expression such as
130+
`CRON_TZ=America/Chicago 30 2 * * *` which would set the default quiet hours to
131+
2:30 AM in the America/Chicago timezone. The cron schedule can only have a
132+
minute and hour component. The default schedule is UTC 00:00. It is recommended
133+
to set the default quiet hours to a time when most users are not expected to be
134+
using Coder.
135+
136+
Admins can force users to use the default quiet hours with the
137+
[CODER_ALLOW_CUSTOM_QUIET_HOURS](./cli/server.md#allow-custom-quiet-hours)
138+
environment variable. Users will still be able to see the page, but will be
139+
unable to set a custom time or timezone. If users have already set a custom
140+
quiet hours schedule, it will be ignored and the default will be used instead.
141+
84142
### Automatic updates
85143

86144
> Automatic updates is part of an

0 commit comments

Comments
 (0)