Files
coder/cli/testdata/coder_schedule_extend_--help.golden
T
Susana Ferreira 92d505c52b feat(cli): prevent coder schedule command on prebuilt workspaces (#19259)
## Description

This PR adds CLI-side validation to prevent the use of the `coder
schedule` command (including both `start` and `stop` subcommands) on
prebuilt workspaces.

Prebuilt workspaces are scheduled independently by the reconciliation
loop, based on template and preset-level configuration. They do not
participate in the regular user workspace lifecycle, and cannot be
configured via the `coder schedule` CLI command. This change ensures
that attempting to configure scheduling on a prebuilt workspace results
in a clear CLI error.

## Changes

- `coder schedule start` — now returns an error if the target workspace
is a prebuild
- `coder schedule stop` — now returns an error if the target workspace
is a prebuild

Related with: 
* Issue: https://github.com/coder/coder/issues/18898
* **Depends on PR**: https://github.com/coder/coder/pull/19252
2025-08-13 18:15:53 +01:00

19 lines
513 B
Plaintext

coder v0.0.0-devel
USAGE:
coder schedule extend <workspace-name> <duration from now>
Extend the stop time of a currently running workspace instance.
Aliases: override-stop
Extends the workspace deadline.
* The new stop time is calculated from *now*.
* The new stop time must be at least 30 minutes in the future.
* The workspace template may restrict the maximum workspace runtime.
$ coder schedule extend my-workspace 90m
———
Run `coder --help` for a list of global options.