Use the top-level pks schedule wizard to set daily auto-start, daily auto-shutdown, and idle shutdown on an Azure VM in one multi-select pass.
pks schedule$ pks scheduleInteractive wizard for start, stop, and idle timing
pks schedule is the interactive superset of pks vm autoshutdown: the same idle and daily shutdown controls, plus daily auto-start, applied to one Azure VM in a single confirmed batch. It belongs to the VM family conceptually but is registered as a top-level command.
Note. The command is
pks schedule, notpks vm schedule. Running it under thevmbranch will not resolve.
pks azure init first.pks schedule
There are no arguments and no flags. Everything is prompted, so the command cannot be used in a script or a non-interactive session.
The first prompt selects one machine from the tracked list.
The wizard offers any combination of:
Each selected option prompts for its value. A summary panel then shows everything you chose before anything is applied.
Confirming applies all selected changes in one batch — Azure schedule writes for the start and stop times, an SSH-based systemd change for the idle threshold — and reports any per-item errors at the end.
Partial application is possible. A failure in one selected item does not roll back the items that already succeeded; the failures surface as warnings and the command exits with a non-zero status even when others applied cleanly.
pks vm status
The panel shows the idle and scheduled shutdown configuration for the machine.
| Symptom | Cause and fix |
|---|---|
| Azure errors on every item | The selected machine is not an Azure VM, or the Azure context is wrong. Confirm the provider with pks vm list. |
| A warning about VM identifier resolution | Resolution failed and the schedule calls proceeded with an empty identifier, which may silently do nothing. Rerun after confirming the machine and resource group in pks vm status. |
| Some items applied, some did not | Per-item failures do not roll back successes. Rerun the wizard selecting only the failed items. |
| No second-factor prompt appeared | pks schedule is not covered by the action guard, unlike the other billing-affecting VM commands. |