Whether you’re wrapping up work for the day or want your computer to power off after a long download, scheduling an automatic shutdown can save you time, energy, and hassle. In this guide, you’ll learn easy, built-in methods—and a few bonus tools—to schedule shutdowns on both macOS and Windows. By the end, you’ll be able to:
- Set up a one-off or recurring shutdown without third-party software
- Automate complex workflows (e.g., wake, run a task, then shut down)
- Troubleshoot common snags so your schedule always runs smoothly
Whether you’re a beginner or a power user, these methods will help you master shutdown scheduling on your preferred platform.
1. Schedule Shutdown on Windows (PC)
- Open Task Scheduler
- Press Win + R, type taskschd.msc, and hit Enter.
- In the left pane, click Task Scheduler Library.
- Create a New Task
- In the Actions pane, click Create Basic Task….
- Give it a name (e.g., “Auto Shutdown”) and click Next.
- Set the Trigger
- Choose when you want this to run (Daily, One time, At log on, etc.) and click Next.
- Specify the start date/time and recurrence if applicable. Click Next.
- Choose the Action
- Select Start a program and click Next.
- Configure the Shutdown Command
- In Program/script, enter:
shutdown
- In Add arguments, enter one of the following:
/s /f /t 0
→ shutdown immediately, force-close apps/s /f /t 3600
→ shutdown after 1 hour (3600 seconds)
- Click Next.
- In Program/script, enter:
- Finish and Review
- Check Open the Properties dialog for this task when I click Finish.
- Click Finish, then in Properties, under Conditions, uncheck Start the task only if the computer is on AC power if you want it on battery.
- Click OK to save.
- Test Your Task
- Right-click the task in Task Scheduler Library and select Run.
- Your PC should initiate shutdown as configured.
2. Schedule Shutdown on macOS
Method A: Energy Saver Preference (macOS Ventura and earlier)
- Open System Settings
- Click the Apple menu → System Settings (or System Preferences).
- Go to Energy
- Select Energy (or Battery > Schedule… on laptops).
- Schedule Power Events
- Click Schedule…
- Tick Shutdown and set the day(s) and time.
- Click OK to confirm.
Note: On macOS Sonoma and later, this setting is under Lock Screen & Power in System Settings.
Method B: Terminal + pmset
Command
- Open Terminal
- Finder → Applications → Utilities → Terminal.
- Enter the
pmset
Command- One-off shutdown at 11 PM today:
sudo pmset schedule shutdown "2025-06-24 23:00:00"
- Daily shutdown at 11 PM:
- s
udo pmset repeat shutdown MTWRFSU 23:00:00
- s
- Enter your admin password when prompted.
- One-off shutdown at 11 PM today:
- Verify Scheduled Events
pmset -g sched
3. Pro Tips & Workflow Improvements
- Use Batch/AppleScript for More Complex Tasks
- Windows: put your shutdown command in a
.bat
file with pre-shutdown scripts. - macOS: wrap
pmset
calls in an AppleScript or shell script and trigger via Automator.
- Windows: put your shutdown command in a
- Add a Warning Message
- Windows: in a batch file, use
msg * "PC will shutdown in 5 minutes..." before shutdown.
- macOS: use
osascript -e 'display dialog "Shutting down in 5 minutes…" buttons {"OK"}'.
- Windows: in a batch file, use
- Combine Wake & Shutdown
- Windows: Schedule a “Wake the computer” trigger in Task Scheduler, then shutdown.
- macOS: use
pmset repeat wakeorpoweron
alongside shutdown.
- Third-Party Utilities
- Windows: NirCmd (free) for advanced scripting.
- Mac: Power Manager (paid) for an intuitive GUI scheduler.
- Log Shutdown Events
- Windows: enable task history in Task Scheduler for auditing.
- macOS: check
/var/log/system.log
for shutdown entries.
4. Advanced Use Case: Batch Scheduling & Conditional Shutdown
Create a script that:
- Checks if a specific app (e.g., a download manager) is running.
- If not, initiates shutdown.
Example (macOS shell script):
#!/bin/bash
if ! pgrep -x "Transmission" >/dev/null; then
sudo shutdown -h +1
fi
- Save as
auto_shutdown.sh
, make it executable (chmod +x
), and invoke via cron or Automator Calendar alarm.
5. Troubleshooting & Common Mistakes
- “Access Denied” or “Requires Administrator”
- Windows: Run Task Scheduler as Administrator.
- macOS: Prepend
sudo
and ensure your user is an admin.
- Task Doesn’t Run on Battery
- Windows: In task Properties > Conditions, uncheck “Start the task only if the computer is on AC power.”
- macOS: Energy settings may disable events on battery—use
pmset -b
flags for battery-specific commands.
- Wrong Time Zone / Off by One Hour
- Check your system clock and Time Zone settings. Scheduled tasks follow local time.
- Shutdown Doesn’t Occur Because Apps Are Open
- Use the force flag (
/f
on Windows,-h now
on macOS) or prompt users to save work beforehand.
- Use the force flag (
- Multiple Schedules Overlap
- Review existing tasks (
pmset -g sched
on macOS, Task Scheduler Library on Windows) and remove duplicates.
- Review existing tasks (
Conclusion
You’ve learned how to schedule automated shutdowns on both Mac and PC—using everything from graphical interfaces to powerful command-line tools. Automating your shutdown routine not only conserves energy but also ensures your system powers off safely when you’re away. Practice setting up different schedules, experiment with scripts, and explore the advanced use cases to supercharge your workflow.
Next up: try scheduling automatic wake-up events or batch restart tasks to complete your automation toolkit!