| Tested on | RHEL 10.2 (Coughlan) — vm1.lab.example |
|---|---|
| Package | systemd 257-23.el10_2.2at 3.2.5-14.el10_1 |
| Applies to | RHEL, Rocky Linux, AlmaLinux, Fedora, Ubuntu, Debian, and other Linux hosts using systemd as PID 1 |
| Privilege | sudo or root to schedule, inspect, and cancel reboots |
| Scope | Schedule a delayed reboot, notify users, inspect the pending job, cancel it, and send a dry-run warning with -k. Covers shutdown, systemctl reboot --when=, and a short at example. Does not cover immediate reboot, poweroff, halt, or full shutdown command reference — see the linked boot and shutdown guide. |
| Related guides | Boot, reboot and shutdown at command systemctl command crontab command Run script before shutdown |
A delayed reboot is useful when an update requires a restart but you need to wait for a maintenance window or give logged-in users time to finish work. If you are delaying a reboot after package updates, confirm first whether one is actually required. On systemd hosts you schedule the event instead of running reboot immediately, and you keep a cancel path if the window moves.
For immediate power actions and a full command reference, see Boot, Reboot and Shut Down Linux with systemd.
Quick answer
| Goal | Command |
|---|---|
| Reboot in N minutes | sudo shutdown -r +15 "maintenance in 15 minutes" |
| Reboot at a clock time | sudo shutdown -r 22:30 "nightly patch window" |
| Show pending job | sudo shutdown --show |
| Cancel pending job | sudo shutdown -c |
| Schedule with systemctl | sudo systemctl reboot --when="+15min" |
| Cancel systemctl schedule | sudo systemctl reboot --when=cancel |
| Warn only (no reboot) | sudo shutdown -k +10 "drill message" |
| One-off at a fixed time | echo "shutdown -r now" | at 02:00 (see at command) |
Leave a space between the time argument and the wall message. shutdown -r +5"message" fails to parse on current systemd releases.
Schedule a delayed reboot with shutdown
The shutdown command is the traditional front end for timed power events. On RHEL 10 it is a compatibility wrapper around systemctl, but the +MINUTES and HH:MM syntax is still what most runbooks use.
Schedule a reboot five minutes ahead and attach a wall message:
sudo shutdown -r +5 "GLC maintenance test"Sample output:
Reboot scheduled for Fri 2026-08-21 14:32:15 IST, use 'shutdown -c' to cancel.The scheduler line confirms the absolute deadline. Logged-in TTY and SSH sessions also receive broadcast traffic as the window closes; five minutes before shutdown, /run/nologin blocks new logins (see Boot, Reboot and Shut Down Linux with systemd for that timeline).
Other common time forms:
+15— fifteen minutes from now22:30— 22:30 today, or tomorrow if that time already passednow— immediate reboot (same asshutdown -r now)
If you omit the message, systemd still schedules the job; add a short quoted string so users know why the host is going down.
Check or cancel the scheduled reboot
After scheduling, read the queue before you walk away:
sudo shutdown --showSample output while a job is active:
Reboot scheduled for Fri 2026-08-21 14:32:15 IST, use 'shutdown -c' to cancel.If plans change, cancel the job:
sudo shutdown -cshutdown -c exits silently on success. Verify the queue is empty:
sudo shutdown --showSample output:
No scheduled shutdown.On the tested RHEL 10.2 system, shutdown --show returned exit status 1 when no shutdown was scheduled. That non-zero exit did not mean the cancel failed—the line above is what confirms the queue is idle.
Tell users the maintenance window was called off. A cancelled job stops the reboot, but earlier wall messages may still be visible in their sessions.
Warn users without rebooting
Maintenance drills and communication tests sometimes need the wall traffic without powering off. The -k flag schedules warnings only:
sudo shutdown -k +3 "drill only — no reboot"Sample output:
Shutdown scheduled for Fri 2026-08-21 14:30:20 IST, use 'shutdown -c' to cancel.Despite the word “Shutdown” in the line, -k does not enqueue halt, poweroff, or reboot. Cancel the drill the same way as a real job:
sudo shutdown -cUse -k to validate messaging paths; use -r +N when the host should actually restart.
Schedule a reboot with systemctl --when
systemd 254 and later expose the same scheduling through explicit verbs. This spelling fits scripts that already call systemctl for units:
sudo systemctl reboot --when="+10min"Sample output:
Reboot scheduled for Fri 2026-08-21 14:37:20 IST, use 'systemctl reboot --when=cancel' to cancel.Inspect the shared shutdown queue:
sudo systemctl reboot --when=showSample output:
Reboot scheduled for Fri 2026-08-21 14:37:20 IST, use 'systemctl reboot --when=cancel' to cancel.Cancel before the timer fires:
sudo systemctl reboot --when=cancelThe cancel command exits silently. Confirm nothing remains:
sudo systemctl reboot --when=showSample output:
No scheduled shutdown.ISO-style durations such as +15min work here; shutdown remains better when you need HH:MM wall-clock times or the classic +MINUTES form. The boot and shutdown guide walks through both interfaces side by side.
Schedule a one-off reboot with at
Use at only when you specifically want the reboot managed as an at job or are already using the at queue. For normal delayed reboots, shutdown -r HH:MM or systemctl reboot --when= is simpler. The example below queues shutdown -r now for 02:00; when that time has already passed today, at schedules the job for the next day:
echo "shutdown -r now" | at 02:00Sample output:
warning: commands will be executed using /bin/sh
job 40 at Sat Aug 22 02:00:00 2026List pending jobs before the window:
atqSample output:
40 Sat Aug 22 02:00:00 2026 a rootRemove the job if the maintenance slips:
sudo atrm 40Replace 40 with the job number from atq. An at job runs the command at the chosen time without systemd wall traffic or /run/nologin unless you wrap it in shutdown yourself.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
Failed to parse time specification: +5message |
Missing space before the wall message | Use shutdown -r +5 "message" — space before the opening quote |
shutdown --show exits non-zero while idle |
Tested RHEL 10.2 returned exit 1 with No scheduled shutdown; other distros may differ |
Read the printed line; do not treat a non-zero exit alone as a failed cancel |
| Users cannot log in before the reboot | /run/nologin appears five minutes before shutdown |
Finish work or cancel with shutdown -c; see the boot guide for the timeline |
at: command not found |
at package not installed |
Install at and enable atd, or use shutdown / systemctl --when= |
| Scheduled reboot never cancelled but did not run | Job removed by another admin or different interface | Check shutdown --show and systemctl reboot --when=show; only one shutdown queue exists |
Confusion after editing DefaultTimeoutStopSec |
Stop timeout controls service stop time after shutdown begins, not a scheduled delay | Schedule with +N or --when= instead |
References
Summary
Delaying a reboot is how you align maintenance with a countdown instead of dropping active sessions the moment an update finishes. The practical path is shutdown -r +MINUTES with a wall message, then shutdown --show to read the deadline and shutdown -c if the window moves.
systemd adds systemctl reboot --when="+15min" for the same queue when your scripts already speak systemctl. Use shutdown -k when you only need to test messaging, and reserve at only when you want the reboot on the at queue—not for ordinary delayed reboots. DefaultTimeoutStopSec is unrelated: it governs how long systemd waits for services to stop after shutdown begins, not how far ahead you can schedule a reboot.

