Skip to content

cli: support enabling/disabling auto start / auto stop #813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #850
johnstcn opened this issue Apr 1, 2022 · 6 comments
Closed
Tracked by #850

cli: support enabling/disabling auto start / auto stop #813

johnstcn opened this issue Apr 1, 2022 · 6 comments
Assignees
Labels
api Area: HTTP API cli Area: CLI
Milestone

Comments

@johnstcn
Copy link
Member

johnstcn commented Apr 1, 2022

As a user, I want to be able to enable and disable autostart / autostop for my workspaces using the CLI:

Examples:

  • coder workspaces autostart enable my-workspace '30 9 * * 1-5' will enable workspace autostart for my-workspace every weekday at 0930 my local time (whatever my system time location is set to).
  • coder workspaces autostart disable my-workspace will disable workspace autostart.
  • coder workspaces autostop enable my-workspace '59 23 * * 1-5 Asia/Kolkata' will enable workspace autostop every day at 23:59 India time.
@johnstcn johnstcn added this to the Community MVP milestone Apr 1, 2022
@johnstcn johnstcn self-assigned this Apr 1, 2022
@johnstcn johnstcn added Community MVP api Area: HTTP API labels Apr 1, 2022
@misskniss misskniss modified the milestones: Community MVP, V2 Beta Apr 2, 2022
@misskniss misskniss mentioned this issue Apr 11, 2022
13 tasks
@johnstcn
Copy link
Member Author

Fixed by #922.

@ammario
Copy link
Member

ammario commented May 12, 2022

Love the crontab format

@johnstcn
Copy link
Member Author

Love the crontab format

I actually ended up changing the CLI for it to make it slightly friendlier, it's now more like:

coder autostop enable cian-gcp --minute 20 --hour '*' --days '1-5' --tz Europe/Dublin

It's still all crontab under the hood though!

@ammario
Copy link
Member

ammario commented May 13, 2022

I preferred the standard crontab format. It is already well documented throughout the internet, and something most DevOps people (our ideal configurer) will be familiar with. If we want to help them a little, we could include a link to crontab.guru.

This is in the spirit of invent as little as possible and as a last resort.

@ammario ammario reopened this May 13, 2022
@ammario
Copy link
Member

ammario commented May 13, 2022

In addition to that problem, I do not see the auto start functionality in the CLI, so I think this was mistakenly closed.

@johnstcn
Copy link
Member Author

johnstcn commented May 13, 2022

@ammario It's hidden until done. See: #1418

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Area: HTTP API cli Area: CLI
Projects
None yet
Development

No branches or pull requests

5 participants