Skip to content

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

Closed

Description

@johnstcn

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.

Activity

  1. added this to the Community MVP milestone on Apr 1, 2022
  2. self-assigned this
    on Apr 1, 2022
  3. johnstcn commented on Apr 12, 2022

    @johnstcn
    MemberAuthor

    Fixed by #922.

  4. ammario commented on May 12, 2022

    @ammario
    Member

    Love the crontab format

  5. johnstcn commented on May 12, 2022

    @johnstcn
    MemberAuthor

    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!

  6. ammario commented on May 13, 2022

    @ammario
    Member

    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.

  7. ammario commented on May 13, 2022

    @ammario
    Member

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

  8. johnstcn commented on May 13, 2022

    @johnstcn
    MemberAuthor

    @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

Metadata

Metadata

Assignees

Labels

apiArea: HTTP APIcliArea: CLI

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions