Skip to main content

⏰ Scheduling a Reboot in Advance on Debian Linux (Using shutdown)

  1. Check Server Time:
  • Open a terminal and log in.
  • Execute the date command to display the current date and time:
root@ggRock:~# date
Thu 13 Mar 12:56:36 GMT 2025
  • Verify that the displayed time and date are accurate. If they are not, adjust the server's time using timedatectl or ntpd.
    For Example: sudo timedatectl set-time 'YYYY-MM-DD HH:MM:SS' or ensure your ntp client is running.
  1. Calculate the Time Difference:
  • Current time: (Obtain from the date command output)
  • Desired reboot time: 5:30 PM
  • Time difference: Calculate the difference in hours and minutes, then convert it to total minutes.
  • For example, if the current time is 1:00 PM, the time difference would be 4 hours and 30 minutes, or 270 minutes.
  1. Schedule the Reboot:
  • Log in as root or use sudo.
  • Execute the shutdown command, replacing [minutes] with your calculated time difference:
  • Example (using the previous calculation of 270 minutes):
root@MediaCityGG:~# shutdown -r +270
Reboot scheduled for Thu 2025-03-13 17:31:35 GMT, use 'shutdown -c' to cancel.
  1. Cancel the Reboot (if needed):
  • To cancel the scheduled reboot, execute shutdown -c.

Was this article helpful?

More in Debian OS

Not finding what you are looking for?

Chat with us or send us an email. Chat is open 24/7 through the bubble at the bottom right.

Send us an email