Restart Policies
Updates, kernel upgrades, renames and deployments often leave machines waiting for a restart. Restart Policies let Athena finish the job on your terms. You choose the maintenance windows, a deadline, the countdown notices users see, how many times they may snooze, and how servers and PIN-protected machines are treated. Each agent applies its policy itself, on its own clock, so a restart still happens on time when the machine can't reach the server. It works on Windows, Linux and macOS agents, and it runs entirely between your Athena server and its agents, so it works on an air-gapped network.
- Windows, Linux and macOS agents. What counts as "restart pending" differs per OS (see What counts as restart pending).
- A licensed module. Your licence must include Restart Policies
(
module.restart). Without it, the pages are hidden, the REST endpoints return403and nothing is sent to agents. See Separately licensed modules. - Nothing is restarted by default. The master switch Enforce restart policies on agents is off by default. Until you turn it on, agents only report their pending-restart state.
- Not copied by settings sync. Restart policies stay on the server where you create them. Settings sync does not copy them to your other Athena servers.
- Not the same as a one-off restart. To restart a machine right now, use Restarting Computers. Restart Policies never restart a machine on request.
Where Restart Policies appear#
| Place | Address | What it shows |
|---|---|---|
| Policies → Restart Policies | /policies/restart | The enforcement switch, the Policies list, the Fleet tiles and the Assignments list. It is the fifth module in the Policies group, after BIOS. |
| Policy editor | /policies/restart/new, /policies/restart/editor/<id> | New restart policy / Edit restart policy. |
| Pending restart page | /policies/restart/pending | Every agent waiting for a restart and what its policy will do next. Open it with Open pending restarts. |
| Policies landing card | /policies | Waiting for a restart, Overdue and Restarted (24 h). |
| Agent details → Restart Policy | Agent details tab | One machine's effective policy, state, reasons and recent events. Read-only. |
The list, fleet page, landing card and agent tab update live when an agent reports. Nothing on these pages polls. Times on the fleet page and agent tab are each agent's own clock.
Permissions
| Permission | Key | Default roles | Allows |
|---|---|---|---|
| View restart policies | restart.view | Helpdesk, Operator, Admin | See restart policies, their assignments and each agent's pending-restart state. The Restart Policies page and agent tab are hidden without it. |
| Manage restart policies | restart.manage | Operator, Admin | Create, edit, delete and assign restart policies, and turn restart enforcement on or off. Also needed to turn on unattended restart of PIN/FileVault machines. |
Restarting a machine on demand is a separate permission, agents.restart
(see Permission Model).
Quick start#
- Open Policies → Restart Policies and click New policy.
- Give it a name, add one or more maintenance windows, check the deadline and notices, and click Save.
- Under Assignments, pick the policy and a collection, tag or agent, and click +. Start with a small test collection.
- Watch the Fleet tiles and the agents' Restart Policy tabs. While enforcement is off, agents report and nothing is restarted, so you can see what would happen.
- When you are happy, tick Enforce restart policies on agents.
What counts as "restart pending"#
The agent checks for a pending restart every minute. When it finds a reason, a restart becomes pending, and the time it started counts toward the deadline. A restart of the machine closes it. These are the same reasons as the core Restart Pending inventory field.
| Reason (as shown) | OS | Detected when |
|---|---|---|
| Servicing stack | Windows | Component-based servicing reports a reboot pending, in progress or packages pending. |
| OS update | Windows | Windows Update reports that a reboot is required. |
| OS update | Linux | /run/reboot-required exists (Debian/Ubuntu), needs-restarting -r exits 1 (RHEL family) or zypper needs-rebooting exits 102 (SUSE). |
| Newer kernel installed | Linux | An installed kernel is newer than the one running. |
| OS update | macOS | Reported, but never triggers a restart on macOS in this release. |
| Computer rename | Windows | The computer name was changed and needs a restart. |
| Domain join | Windows | A domain join is waiting for a restart. |
| Secure Boot certificate update | Windows | The Secure Boot 2023 certificate update needs a restart. |
| ConfigMgr client | Windows | The ConfigMgr client, when present, reports a pending restart. |
| Athena deployment | All | An Athena deployment finished and asked for a restart. It stays until the next boot. |
| Pending file renames | Windows | Counts only if the policy ticks Also restart for pending file renames only. Installers and antivirus often leave these behind, and some never clear. |
| Maximum uptime reached | All | The policy's maximum uptime has passed since the last boot. |
| Scheduled restart | All | One of the policy's scheduled restarts is open. |
The enforcement switch and the lease#
Enforce restart policies on agents, at the top of the Restart Policies page, is the master switch. It is off by default. While it is off, agents with a policy report what is pending and what they would do, and the agent tab says "Enforcement is off, so the agent only reports." Turning it on or off is audited as a warning.
Each agent keeps its policy for a lease of 14 days without contact. The server renews the lease when the agent connects, whenever you change a policy, assignment or the switch, and once a day on its own. When a lease runs out with no renewal, the agent stops restarting and only reports ("The agent's policy lease ran out without a refresh, so it only reports."). This means an agent can keep restarting for up to the lease length after the module stops being licensed, because an unlicensed server sends nothing.
- The lease length is set with the REST API only:
PUT /api/restart/settingswithleaseDaysfrom 1 to 365. - The daily refresh interval is the
Modules:Restart:LeaseRefreshHourssetting (default24, minimum 1) in configuration. - To re-send every connected agent its policy now, schedule the Restart Policy Lease Refresh task in Scheduled Jobs.
Creating a restart policy#
Click New policy, or the edit icon in a policy's row. The editor has the sections below. The policy list shows each policy's windows (for example Mon-Fri 02:00-04:00, or no window (deadline only)), its deadline and notices (deadline 72 h, notice at 60/15/5, 3 snoozes x 60 min), its server mode, where it is assigned, how many agents hold it, and whether it is enabled.
General
| Field | Values | Notes |
|---|---|---|
| Name | Up to 100 characters | Required and unique, ignoring case. |
| Description | Up to 500 characters | Optional. |
| Policy enabled | On (default) / off | A disabled policy is skipped when Athena works out which policy an agent gets, so its agents fall through to the next matching assignment. |
Maintenance windows
Add up to 20 windows. Each has Days (Mon to Sun), a Start and an End. Times are the agent's own local time, so one policy works across time zones. A window whose end is at or before its start crosses midnight and belongs to the day it starts; for example, Sun 22:00-04:00 runs from Sunday night into Monday morning. A start equal to the end is a whole 24 hours.
With no window, the machine restarts only at the deadline (or at a scheduled restart).
Spread restarts over (minutes) (default 30, 0-240) moves each machine to its own
fixed moment inside the window, so the whole fleet doesn't restart and reconnect at once. A machine always gets
the same moment.
On clock changes, a window start that falls in the skipped hour moves to the first valid minute after it. A start in the repeated hour uses its first occurrence, and the window runs once.
Uptime and scheduled restart
- Restart when up longer than (days): off by default; 1-365 days when on (the editor suggests 30). Past this many days since the last boot, the machine gets a pending restart (Maximum uptime reached) that follows all the other rules: windows, notices, snooze and the deadline.
- Scheduled restart (cron): off by default (the editor suggests
0 3 * * 6, Saturday 03:00). It uses the same cron format as the Scheduler, and the editor previews the next 5 times in each agent's local time. Each time opens a 60-minute restart window of its own. If nobody is signed in, the machine restarts at that time (spread by up to 30 minutes, and never more than Spread restarts over). If someone is signed in, the countdown starts. A machine that is asleep, off or skipped during that hour has missed it. A missed restart is recorded but never caught up later. A schedule that fires more often than once an hour is refused. Every-other-week can't be written in cron.
Deadline
| Field | Default | Range | Notes |
|---|---|---|---|
| Force the restart after a deadline / Force the restart after (hours pending) | On, 72 hours (editor) | 1-2160 hours (90 days) | Counted from when the restart became pending. Untick for no deadline: the machine then restarts only in a window. |
| Final notice (minutes) | 15 | 1-120 | The countdown that starts when the deadline passes. |
| Delay for an Athena remote session (minutes) | 60 | 0-240 | How long past the deadline a remote session in progress can hold off the restart. |
After the deadline, the restart ignores windows, signed-in users and battery, and snooze is no longer offered. Only an Athena remote session in progress delays it, up to the delay above. Servers in Notify only or Exclude mode, and PIN/FileVault machines with nobody signed in, are still not restarted.
Notifications and snooze
| Field | Default | Range |
|---|---|---|
| Countdown notices (minutes before) | 60, 15, 5 | Up to 10 different whole numbers, each 1-1440, separated by commas. The largest is the length of the countdown. |
| Snoozes allowed | 3 | 0-10 |
| Snooze length (minutes) | 60 | 5-480 |
With a deadline, no countdown step or final notice may be longer than the deadline, and all snoozes together (snoozes × length) may not be longer than the deadline. Linux shows a terminal message and a desktop notification, but it can't offer snooze (see What users see).
Skip conditions
| Field | Choices / default | Effect before the deadline |
|---|---|---|
| When a user is signed in | Count down, then restart (default) | Inside a window, a signed-in user gets the countdown notices and can snooze. If every signed-in session is locked, the countdown waits until someone unlocks, then starts fresh. |
| Wait until nobody is signed in | The machine is not restarted while anyone is signed in. | |
| Ignore signed-in users | Restarts in the window without a countdown, whether or not someone is signed in. | |
| Restart at once when nobody is signed in | Off | When on, a machine with nobody signed in restarts as soon as a restart is pending, even outside a window. |
| Wait while on battery (before the deadline) | On | A laptop on battery waits. |
An Athena remote session in progress always holds off a restart before the deadline. A disconnected session doesn't count as signed in.
Servers
Machines running a server OS has three choices:
- Notify only, never restart (default): the signed-in user gets one information notice per pending restart, and the machine is never restarted by the policy, even after the deadline.
- Restart them like any other machine.
- Leave them out entirely: nothing is shown or restarted.
Linux and macOS can't say whether they are servers, so they always count as servers. A Windows machine whose server type can't be read counts as a server too. With the default Notify only, Linux and Mac machines are therefore only notified. To restart them, use a policy set to Restart them like any other machine and assign it to them.
PIN and FileVault machines
Some machines ask for a PIN or password before Windows or macOS starts: BitLocker TPM+PIN, TPM+startup key, TPM+PIN+startup key, password or USB key protectors, or FileVault on a Mac (on, or about to be turned on). If Athena can't read the protection, it assumes input is needed (Unknown (could not be read)). These machines are never restarted while nobody is signed in, so someone is there to type the PIN. They restart when a user is signed in, for example at the deadline or when the user clicks Restart now. Until then their state is Waiting for a signed-in user.
Allow unattended restart of PIN/FileVault machines is off by default and needs Manage restart policies. Turning it on asks you to confirm, because it lowers disk protection for one boot:
- Windows: BitLocker is suspended for that one restart, so the disk opens without its PIN for that boot.
- macOS: the server sends the escrowed FileVault recovery key to the Mac for that one restart, and rotates it afterwards. This works only for Macs whose key is escrowed (see FileVault Recovery Keys) and while the BitLocker/FileVault module is licensed. Otherwise the Mac waits for a signed-in user as above.
Every use is audited. Saving a policy with this option on, or changing it, is audited as a warning.
How the agent decides#
Every minute, an agent with a pending restart works through these rules in order:
- Report only if it holds no policy, the lease ran out, the policy is disabled or enforcement is off (Not managed).
- Nothing to do if no reason is pending (Not pending).
- Loop guard. The policy restarts a machine at most once per pending restart and at most twice in any 24 hours. If the same reasons are still there after its own restart, the machine is Still pending after restart and needs a person. If a restart was issued but the machine hasn't booted 15 minutes later, it is Restart failed. It isn't retried.
- Servers follow the server mode.
- Someone else's restart that is already scheduled on the machine is left alone and never cancelled (Restart scheduled elsewhere). After it, the user is warned again before any restart.
- PIN/FileVault machines follow the pre-boot rule.
- After the deadline: the final countdown runs, with no snooze (Overdue).
- Before the deadline: a snooze is honoured (Snoozed), then the skip conditions apply (Pending). In a window or an open scheduled restart, the countdown starts (Countdown), or the machine restarts at its spread moment. Outside every window it waits for the next one (Scheduled), or for the deadline if there is no window (Pending).
What users see#
Every notice names the product, so users know the restart is genuine. The text is fixed; nothing from the policy is shown. The first sentence says when and why, for example: "Athena Endpoint Platform will restart this computer at 03:00 to finish installing updates." A scheduled restart says "for its scheduled restart", and one for uptime alone says "because its maximum uptime was reached". Then it says how often the user can still postpone, and the latest restart time if there is a deadline. The final countdown says "This restart was postponed as long as your organisation allows. Save your work now."
| OS | Notice | Buttons |
|---|---|---|
| Windows | A window titled Athena Endpoint Platform — Restart required with a live countdown and the footer "Your IT department manages this device". | Snooze (labelled with the length, for example Snooze 1 h) while snoozes are left, and Restart now. |
| macOS | A dialog titled Athena Endpoint Platform, headed Restart required, shown to the user at the screen. | Snooze (or OK) and Restart now. The default button is never the restart button, so pressing Return never restarts the Mac. |
| Linux | A terminal message to every logged-in terminal, plus a desktop notification in each active graphical session where possible. | None. No snooze and no Restart now. |
- Closing or ignoring a notice changes nothing. The restart goes ahead on schedule.
- Snooze postpones the restart by the snooze length. When it ends, the policy is checked again; in a window, a new countdown starts.
- Restart now ends the countdown, or the snooze, at once.
- A Notify only server gets an information notice: "…needs to restart this computer… Please save your work and restart when you can." It has only OK and closes by itself after 15 minutes.
Assignments#
An assignment links a policy to a collection, a tag or a single agent. Pick them in the two lists below Assignments and click +. New assignments go to the bottom. One policy can have several assignments.
- A lower priority wins, and the first match wins, whatever the target type. Use the up and down arrows to change the order.
- Assignments to disabled policies are skipped, so the agent gets the next match.
- An agent with no match is Not managed: it reports, and nothing is restarted.
- An assignment to a deleted collection matches nothing. A tag doesn't need to exist yet.
- Deleting a policy also deletes its assignments.
Changes reach connected agents straight away. The editor lists a policy's assignments, but you add and reorder them on the Restart Policies page.
Agents connected to several servers
An agent that talks to more than one Athena server keeps the first restart policy it receives. It ignores other servers' policies until that server withdraws its policy or the lease ends. The agent tab says which server's policy is in force, for example "Another server's policy is in force: …".
Fleet view and states#
The Fleet tiles on the Restart Policies page count agents in each state. Each tile opens the Agents list filtered by that state. Overdue is highlighted as a warning. Still pending after restart and Restart failed are highlighted as critical. The Pending restart page lists every waiting agent, oldest first, with its OS, pending since, reasons, policy, state, next action (and next scheduled restart), snoozes and last reboot.
| State | Meaning |
|---|---|
| Not pending | Nothing to do. |
| Pending | Waiting: a skip condition applies or no window is set. |
| Scheduled | Restarts at the next maintenance window. |
| Countdown | The countdown is running. |
| Snoozed | Snoozed by the user. |
| Overdue | The deadline has passed. |
| Restarting | The restart has been issued. |
| Still pending after restart | Still pending after a restart. A person must look. |
| Restart failed | The restart was issued but the machine did not reboot. It is not retried. |
| Restart scheduled elsewhere | Another restart is already scheduled; it is left alone. |
| Waiting for a signed-in user | A PIN/FileVault machine restarts only while someone is signed in. |
| Waiting for unlock | Every signed-in session is locked. The countdown starts when someone unlocks; the deadline still applies. |
| Not managed | Reports only. |
Agent details → Restart Policy
The read-only Restart Policy tab shows the Effective policy (name and revision, or Not managed with the reason), which server's policy is in force, Pending since, Last reboot and uptime, Next action, Next scheduled restart (and any missed one), Pre-boot input, Why a restart is pending and Recent events. An agent that has never reported shows "This agent has not reported its restart state yet. Agents older than this feature never do."
Filter fields#
These fields work in the Agents list, dynamic collections and monitors, so you can alert on, for example, overdue machines. While the module is not licensed they read as not applicable. See the Filter Field Reference.
| Field | Label | Type |
|---|---|---|
Module.restart.State | Restart state | Choice: NotPending, Pending, Scheduled, Countdown, Snoozed, Overdue, Restarting, PendingAfterRestart, ExternallyScheduled, WaitingForSignedInUser, NotManaged, RestartFailed, WaitingForUnlock |
Module.restart.PrebootProtector | Pre-boot protector | Text |
Module.restart.PendingHours | Restart pending (hours) | Number |
Module.restart.Reasons | Restart reasons | Text |
Module.restart.UptimeDays | Uptime (days) | Number |
Module.restart.Policy | Restart policy | Text |
For example, /agents?field=Module.restart.State&value=Overdue lists every overdue agent.
Audit events#
| Event | When |
|---|---|
| Restart policy changed | A policy is created, updated or deleted. A warning when unattended restart of PIN/FileVault machines is on or changed. |
| Restart policy assignment changed | An assignment is added, removed or reordered. |
| Restart enforcement settings changed | The master switch or the lease length changed (warning). |
| FileVault key sent for an unattended restart | The escrowed key was sent to a Mac for one restart, or the request was refused (warning). |
| FileVault key rotated after an unattended restart | The key rotation that follows such a restart. |
| BitLocker suspended for one restart | A Windows agent reported a restart with BitLocker suspended for one boot (warning). |
See the Audit Event Types Reference and Audit Forwarding to SIEM.
REST API#
All routes are under /api/restart. view routes need restart.view and manage routes
need restart.manage. Without the licence every route returns 403. Choices travel as names (for
example "serverMode": "Enforce"). Out-of-range values return 400 and are never adjusted.
| Route | Needs | Does |
|---|---|---|
GET /api/restart/settings | view | enforcementEnabled and leaseDays. |
PUT /api/restart/settings | manage | Change either; a null field is unchanged. leaseDays 1-365. |
GET /api/restart/policies, GET /api/restart/policies/{id} | view | List policies, or get one. |
POST /api/restart/policies | manage | Create a policy. 409 if the name is taken. |
PUT /api/restart/policies/{id} | manage | Replace a policy, including all its windows. Its revision goes up by one. |
DELETE /api/restart/policies/{id} | manage | Delete a policy with its windows and assignments. |
GET /api/restart/assignments | view | All assignments. |
POST /api/restart/assignments | manage | Add one (appended last). Body: policyId, targetKind (Agent, Collection or Tag), targetKey (agent id, collection id or tag name). |
DELETE /api/restart/assignments/{id} | manage | Remove one. |
POST /api/restart/assignments/reorder | manage | Body {"assignmentIds": [...]}: every id exactly once, highest precedence first (at most 500). All or nothing. |
GET /api/restart/agents/{id}/state | view | The agent's last reported restart state. 404 if it never reported. |
GET /api/restart/agents/{id}/events?take=20 | view | Its newest events first, at most 50. |
GET /api/restart/agents/{id}/effective-policy | view | The policy this server sends the agent and the assignment that matched. Both null = not managed. |
GET /api/restart/fleet/pending?state=&skip=0&take=100 | view | Counts per state, agents restarted in 24 h, and the waiting agents, oldest first. state narrows the list; take 1-500. |
A policy body uses these fields: name, description, enabled, deadlineHours
(null = no deadline; the API's default), finalNoticeMinutes, countdownMinutes, maxSnoozes,
snoozeMinutes, skipOnBattery, activeUserBehaviour (Countdown,
WaitForNoUser, Ignore), noUserRestartImmediately, serverMode
(Enforce, NotifyOnly, Exclude), restartOnFileRenameOnly,
jitterMinutes, remoteSessionDeferMinutes, allowUnattendedPrebootRestart,
maxUptimeDays (null = off), scheduleCron (null = none) and windows. Each window is
dayMask (Mon=1, Tue=2, Wed=4, Thu=8, Fri=16, Sat=32, Sun=64, added together), startMinute
(0-1439, minutes after midnight) and durationMinutes (1-1440).
For example, a policy for workstations with a Monday-to-Friday 02:00-04:00 window and a 72-hour deadline:
curl -k -X POST -H "Authorization: Bearer <token>" -H "Content-Type: application/json" \
-d '{"name":"Workstations","deadlineHours":72,
"windows":[{"dayMask":31,"startMinute":120,"durationMinutes":120}]}' \
"https://<server>:8443/api/restart/policies"
Then turn enforcement on:
curl -k -X PUT -H "Authorization: Bearer <token>" -H "Content-Type: application/json" \
-d '{"enforcementEnabled":true}' "https://<server>:8443/api/restart/settings"
Troubleshooting#
| Symptom | What to check |
|---|---|
| Agents are Not managed | The tab gives the reason: no policy (no assignment matches, or only disabled ones), enforcement is off, the policy is disabled, or the lease ran out. Check the assignment order. |
| Linux or Mac machines are never restarted | They count as servers, and the default server mode is Notify only. Assign them a policy set to Restart them like any other machine. On macOS a pending OS update alone never triggers a restart. |
| Stuck in Pending | A skip condition applies (on battery, remote session, or Wait until nobody is signed in), or the policy has no window and no deadline. |
| Waiting for a signed-in user | A BitLocker PIN/startup-key/password or FileVault machine with nobody signed in. Wait for a user, or turn on unattended restart. |
| Still pending after restart | The policy restarted the machine and the same reasons are still there, or it already restarted twice in 24 hours. Fix the cause (for example a stuck update) on the machine. It won't be restarted again for the same reasons. |
| Restart failed | The restart was issued but the machine didn't boot within 15 minutes, for example because something cancelled it. It isn't retried. |
| Agent tab says it never reported | The agent is older than this feature, or hasn't connected since. Update the agent. |
| "Another server's policy is in force" | The agent holds another Athena server's policy. It switches when that server withdraws it or its lease ends. |
| Machine skipped its scheduled restart | It was asleep, off or skipped during the 60-minute window. Missed scheduled restarts are shown on the tab and are not caught up. |
| Save refused: "A scheduled restart can run at most once an hour." | Two cron times are less than 60 minutes apart. |
| Save refused: "All snoozes together are longer than the deadline." | Lower the snooze count or length, or raise the deadline. |
Related#
- Restarting Computers: restart a machine on demand.
- Policies: the group this module belongs to.
- Collections and Agent Tags: the groups you assign policies to.
- BitLocker Management and FileVault Recovery Keys: pre-boot protection and escrowed keys.
- Windows Update Management: one common source of pending restarts.
- Licensing: separately licensed modules.