File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,22 @@ import (
10
10
"github.com/coder/coder/codersdk"
11
11
)
12
12
13
+ const autostartDescriptionLong = `To have your workspace build automatically at a regular time you can enable autostart.
14
+ When enabling autostart, provide a schedule. This schedule is in cron format except only
15
+ the following fields are allowed:
16
+ - minute
17
+ - hour
18
+ - day of week
19
+
20
+ For example, to start your workspace every weekday at 9.30 am, provide the schedule '30 9 1-5'.`
21
+
13
22
func workspaceAutostart () * cobra.Command {
14
23
autostartCmd := & cobra.Command {
15
- Use : "autostart" ,
24
+ Use : "autostart enable <workspace> <schedule>" ,
25
+ Short : "schedule a workspace to automatically start at a regular time" ,
26
+ Long : autostartDescriptionLong ,
27
+ Example : "coder workspaces autostart enable my-workspace '30 9 1-5'" ,
28
+ Hidden : true , // TODO(cian): un-hide when autostart scheduling implemented
16
29
}
17
30
18
31
autostartCmd .AddCommand (workspaceAutostartEnable ())
Original file line number Diff line number Diff line change @@ -10,9 +10,22 @@ import (
10
10
"github.com/coder/coder/codersdk"
11
11
)
12
12
13
+ const autostopDescriptionLong = `To have your workspace stop automatically at a regular time you can enable autostop.
14
+ When enabling autostop, provide a schedule. This schedule is in cron format except only
15
+ the following fields are allowed:
16
+ - minute
17
+ - hour
18
+ - day of week
19
+
20
+ For example, to stop your workspace every weekday at 5.30 pm, provide the schedule '30 17 1-5'.`
21
+
13
22
func workspaceAutostop () * cobra.Command {
14
23
autostopCmd := & cobra.Command {
15
- Use : "autostop" ,
24
+ Use : "autostop enable <workspace> <schedule>" ,
25
+ Short : "schedule a workspace to automatically start at a regular time" ,
26
+ Long : autostopDescriptionLong ,
27
+ Example : "coder workspaces autostop enable my-workspace '30 17 1-5'" ,
28
+ Hidden : true , // TODO(cian): un-hide when autostop scheduling implemented
16
29
}
17
30
18
31
autostopCmd .AddCommand (workspaceAutostopEnable ())
You can’t perform that action at this time.
0 commit comments