Kodekloud iconKodekloudAug 23, 2026 ~6 min source read

How to Schedule a Reboot in Linux (Even 3 Days From Now)

Use the built-in shutdown command to schedule reboots at a specific clock time or after a set number of minutes, verify or cancel the plan, and avoid common timezone and scheduler mistakes.

How to Schedule a Reboot in Linux (Even 3 Days From Now)

Share this story

Send the public story page.

Useful takeaways from this story.

Use sudo shutdown -r hh:mm for the next occurrence of an absolute time (up to 24 hours ahead).

Use sudo shutdown -r +minutes to schedule relative reboots beyond 24 hours (do the minute arithmetic).

Inspect scheduled reboots with sudo shutdown --show and cancel anytime with sudo shutdown -c.

# At-a-glance

Scheduling a reboot on a Linux server is simple and safer when you use shutdown. It warns logged-in users, blocks new logins in the final minutes, and provides commands to show or cancel the schedule. The command accepts an absolute clock time (hh:mm) for the next occurrence or a relative time (+minutes) that can reach days into the future.

# Step 1 — Verify the server clock

A scheduled reboot uses the server's time, not yours. Run timedatectl to see Local time and Time zone. If the server runs UTC but your maintenance window is local, convert the time or set the server timezone with sudo timedatectl set-timezone Europe/Amsterdam. Getting this wrong causes reboots to land in traffic hours.

# Step 2 — Schedule for an absolute clock time (within 24 hours)

To reboot at the next occurrence of a specific clock time, use hh:mm in 24-hour format. Example:

That schedules the reboot for the next 03:00 the server clock reaches. Because hh:mm always means the next occurrence, it can only schedule up to 24 hours ahead.

# Step 3 — Schedule beyond 24 hours using minutes

To reach past the 24-hour limit, use +minutes. Convert days to minutes (60 × 24 × days) and pass that value:

# Step 4 — Inspect and cancel scheduled reboots

It prints the scheduled time or "No scheduled shutdown." Cancel any pending schedule up to the deadline with:

Cancel works right until the reboot executes, which turns a mistyped time into a minor hiccup rather than an incident.

# Why use shutdown instead of cron or at

# Practical examples

  • Reboot at next 03:00 server time: sudo shutdown -r 03:00
  • Power off in 10 minutes: sudo shutdown +10
  • Reboot in three days: sudo shutdown -r +4320
  • Add a message for users: sudo shutdown -r 03:00 "Rebooting for kernel update, save your work"

# What scheduled reboots survive

The pending shutdown lives in the running system state. Logging out does not remove it, but an intervening reboot for another reason clears the schedule. If the machine restarts before the scheduled time, recreate the schedule after it comes back up.

# Quick checklist before you schedule

  • Run timedatectl to confirm server time and timezone.
  • Choose hh:mm for the next-clock occurrence or +minutes for relative scheduling beyond 24 hours.
  • Use sudo shutdown --show to verify the plan.
  • Use sudo shutdown -c to cancel if plans change.

Using shutdown gives you a predictable, user-aware way to schedule one-off reboots without installing extra tools or leaving cron cruft behind.

More context around this story.

How to Design a Distributed Job Scheduler
Dzone iconDzoneAug 6, 2026

How to Design a Distributed Job Scheduler

Almost every backend eventually needs to run code on a schedule. Send the invoice at midnight. Retry the failed payment in five minutes. Generate the weekly report every Monday at 7 AM. Clean up expired sessions every hour. On one server, this is easy. You write a cron line and move on. The trouble starts when one serv

Keep reading in the app

Open the app view to save this story, compare related coverage, and continue from the same source.

Open in app