The Palos Publishing Company

Follow Us On The X Platform @PalosPublishing
Categories We Write About

Schedule system shutdowns

Scheduling system shutdowns can be useful for maintenance, energy saving, or automating reboot tasks. Below are common methods to schedule shutdowns for Windows, macOS, and Linux systems:


Windows

Using Command Prompt (cmd):

  • To schedule a shutdown after a specific time (in seconds):

bash
shutdown /s /t 3600

This will shut down the PC after 3600 seconds (1 hour).

  • To schedule shutdown at a specific time, you can create a Task Scheduler task or use the at command (older systems).

Using Task Scheduler:

  1. Open Task Scheduler (taskschd.msc).

  2. Create a new Basic Task.

  3. Set the trigger (daily, weekly, or one-time).

  4. For the action, choose “Start a program”.

  5. Program/script: shutdown

  6. Add arguments: /s /f /t 0 (shutdown immediately; /f forces close apps).

  7. Finish and save.


macOS

Using Terminal:

  • To schedule a shutdown at a specific time:

arduino
sudo shutdown -h +60

This schedules a shutdown 60 minutes from now.

  • To schedule shutdown at a specific clock time:

arduino
sudo shutdown -h 23:00
  • To cancel a scheduled shutdown:

arduino
sudo killall shutdown

Linux

Using Terminal:

  • To schedule shutdown after a delay:

arduino
sudo shutdown -h +30

Shuts down after 30 minutes.

  • To schedule shutdown at a specific time:

arduino
sudo shutdown -h 22:30
  • To cancel shutdown:

arduino
sudo shutdown -c

Automation Tips

  • On Windows, use Task Scheduler for recurring shutdowns.

  • On macOS and Linux, use cron jobs for recurring shutdowns.

Example cron entry to shut down every day at 11 PM on Linux/macOS:

arduino
0 23 * * * /sbin/shutdown -h now

Scheduling shutdowns helps manage energy use and system maintenance automatically. If you want, I can provide step-by-step instructions or scripts for any specific OS.

Share this Page your favorite way: Click any app below to share.

Enter your email below to join The Palos Publishing Company Email List

We respect your email privacy

Categories We Write About