Before you start
- A Windows PC
Method 1 Shut down after a countdown
-
Step 1: Open Run
Press Win + R.
-
Step 2: Enter the command
Type shutdown -s -t followed by the number of seconds and press Enter. Windows shows a notice with the shutdown time.
-
Step 3: Cancel if needed
Run shutdown -a to abort.
shutdown -s -t 1800 (30 minutes)
shutdown -s -t 3600 (1 hour)
shutdown -s -t 7200 (2 hours)
shutdown -a (cancel)
Method 2 Shut down at the same time every day
-
Step 1: Open Task Scheduler
Search for Task Scheduler in Start and open it.
-
Step 2: Create a basic task
Click Create Basic Task, name it “Nightly shutdown” and click Next.
-
Step 3: Set the schedule
Choose Daily and set the time, for example 23:30.
-
Step 4: Set the action
Choose Start a program. In Program/script, type shutdown; in Add arguments, type -s -f -t 60. The 60-second delay gives you time to cancel.
-
Step 5: Finish
Click Finish. To stop it later, right-click the task and choose Disable or Delete.
Troubleshooting
The scheduled task doesn’t run
Open the task’s Properties, select Run whether user is logged on or not and Run with highest privileges. On laptops, untick Start the task only if the computer is on AC power in the Conditions tab.
“A system shutdown has already been scheduled”
Run shutdown -a to cancel the existing one, then schedule again.
Frequently asked questions
How do I restart instead of shut down?
Use -r instead of -s, e.g. shutdown -r -t 600.
Can I make a desktop shortcut?
Yes. Right-click the desktop > New > Shortcut and enter the full command, e.g. shutdown -s -t 3600.
Summary
Run shutdown -s -t [seconds] for a one-off timer and shutdown -a to cancel. For a daily routine, create a Task Scheduler task that runs shutdown -s -f -t 60.