hangar update
Change how long a Hangar may sit idle before it pauses.
Changes how long a Hangar may sit idle before it pauses on its own. Idle means no output
in any window of its terminal and no key from anyone connected, so an agent still at work
keeps it running with nobody watching. The choices run from 15m to 24h, or never,
and a new Hangar starts with 30m unless hangar create --idle-timeout says otherwise.
The platform checks every 5 minutes, so a Hangar pauses up to 5 minutes after its timeout
runs out. Only the setting changes: nothing restarts, and a paused Hangar stays paused
until hangar resume. The console offers the same choices as
Auto-pause in the Hangar's Settings.
Usage
outplane hangar update <HANGAR> [flags]Arguments
| Argument | Type | Description |
|---|---|---|
HANGAR | string | Hangar name or id. Required. |
Flags
| Flag | Type | Description |
|---|---|---|
--idle-timeout | string | How long it may sit idle before it pauses, as a duration or never. Required. One of 15m, 30m, 1h, 2h, 6h, 12h, 24h, never. |
The global flags apply as well.
Output
| Field | Type | Description |
|---|---|---|
hangar | string | The Hangar's immutable name. |
hangarId | string | |
idleTimeoutMinutes | int | null | The idle timeout it now has, in minutes. null for never. |
changed | bool | False when it already had that timeout, and for a dry run. |
Examples
Check the change without sending it
outplane hangar update myhangar --idle-timeout 2h --dry-run --json{
"changed": false,
"hangar": "myhangar",
"idleTimeoutMinutes": 120
}Let it sit idle for up to a day
outplane hangar update myhangar --idle-timeout 24hNever pause it on its own, and read the result
outplane hangar update myhangar --idle-timeout never --json --fields idleTimeoutMinutes,changed{
"changed": true,
"idleTimeoutMinutes": null
}What to Know
- --idle-timeout is required. Without it the command exits 2 with usage.no_change.
- It takes a duration or never. The lengths are 15m, 30m, 1h, 2h, 6h, 12h and 24h, written in minutes or hours, so 60m and 1h are the same. Any other length exits 2 with hangar.idle_timeout_invalid before anything is sent.
- With an idle timeout, the platform checks every 5 minutes and pauses a Hangar whose terminal has had no output in any window and no key from anyone connected for that long, so 30m pauses it 30 to 35 minutes after the last activity. A paused Hangar keeps its disk, its ports and its variables, and
outplane hangar resumestarts it again. - Only the setting is written. This command neither restarts nor pauses the Hangar, and its terminal and agents keep running. One already idle for longer than the new timeout is paused at the next check.
- A paused Hangar keeps its timeout, and changing it does not resume it.
- Idempotent. Setting the timeout it already has sends nothing, reports changed false and exits 0.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
5 | not_found | The named resource does not exist, or is not visible to this credential. |
8 | upstream | The Out Plane API returned a server error. |
The code on the error object is one of usage.no_change, hangar.idle_timeout_invalid, hangar.not_found, hangar.ambiguous, usage.missing_argument, usage.empty_argument, context.no_team. Branch on that, or on the exit status. The message is prose and changes.