{"version":"2.1.224","anchor":"runner-lifecycle-controls-scheduled-retirement-idle-release-","canonical_anchor":"runner-lifecycle-controls-scheduled-retirement-idle-release-","heading":"Runner lifecycle controls: scheduled retirement, idle release, outcome branch push","tier":"use","area":"Self-Hosted Runner","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.224\/e\/runner-lifecycle-controls-scheduled-retirement-idle-release-","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.224","markdown":"### Runner lifecycle controls: scheduled retirement, idle release, outcome branch push\n\nNew flags retire a runner at a set time, release idle sessions, and control drain behaviour.\n\n**What**\n\nThe runner gains a set of flags for managing how long it lives. `--retire-at` (or `SELF_HOSTED_RUNNER_RETIRE_AT`, an absolute Unix timestamp in seconds) releases active sessions, stops accepting new work and exits 0. `--release-idle-session-min` and `--startup-timeout-min` (default 15) are watchdogs, `--kill-session-after-min` waits for the current turn to finish first, and `--drain-wait-sec` sets drain time.\n\n**Details**\n\n- `--drain-wait-bg-tasks-sec` is a deprecated alias for `--drain-wait-sec`.\n- `--push-outcome-on-release` pushes the session's tracked outcome branches to the source remote when a session ends without completing, and fetches them back if that session later resumes on a fresh worker.\n- Retirement releases sessions through the same path as idle release.\n- Release outcomes are reported through telemetry named `self_hosted_release_session`, with reasons including `released_false_backstop`.\n\n**Evidence**\n\n`SELF_HOSTED_RUNNER_RETIRE_AT`\n\n- Area: Self-Hosted Runner\n- Names: `--retire-at`, `SELF_HOSTED_RUNNER_RETIRE_AT`, `--release-idle-session-min`, `--startup-timeout-min`, `--kill-session-after-min`\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 3\/5"}