wer wait

Wait for a resource to reach a specified status.

Usage

wer wait <type> <name> [flags]

Description

The wait command blocks until the specified resource reaches the desired status condition. This is particularly useful in scripts and automation, where you need to ensure a workstation is fully running before executing subsequent commands like wer shell or wer tmux.

For workstations, the default wait target is Running if --for is not specified.

Arguments

Argument Description
type Resource type (workstation or ws)
name The name of the resource to wait for

Flags

Flag Description
--for The status to wait for (e.g., Running, Stopped). Default: Running for workstations
--wait-timeout Maximum time to wait (e.g., 30s, 5m). 0 means no timeout

Examples

# Wait for a workstation to be running (default)
wer wait workstation my-vm

# Wait for a specific status
wer wait workstation my-vm --for=Stopped

# Wait with a timeout
wer wait ws my-vm --wait-timeout=5m

# Start a workstation and wait, then connect
wer start workstation my-vm && wer wait ws my-vm && wer shell --name my-vm