Windows 11 and Windows 10 include several ways to automatically shut down a computer after a certain amount of time. This can be useful when you are downloading a large file, watching a long video, running a backup, installing software, or performing another task that you do not want to monitor until it finishes.
You can schedule a shutdown using the Run dialog, Command Prompt, PowerShell, Task Scheduler, or a desktop shortcut. The simplest method is the shutdown command because you only need to specify how many seconds Windows should wait before turning off the computer.
Here are several ways to automatically shut down Windows after a specific amount of time.
Method 1: Use the Run Dialog
The quickest way to schedule a one-time shutdown is through the Run dialog.
- Press Windows + R.
- Type the following command:
shutdown /s /t 3600
- Press Enter.
Windows will schedule a shutdown after 3600 seconds, which equals one hour.
You can replace 3600 with the number of seconds you want.
For example:
shutdown /s /t 1800
This schedules a shutdown after 30 minutes.
For two hours:
shutdown /s /t 7200
This method is useful when you want a quick temporary shutdown timer without creating a permanent task.
Method 2: Use Command Prompt
Command Prompt provides another easy way to schedule an automatic shutdown.
- Open Start.
- Search for Command Prompt.
- Open it.
- Type:
shutdown /s /t 3600
- Press Enter.
Windows will schedule the shutdown.
You can change the number at the end of the command according to the required delay.
For example:
shutdown /s /t 600
shuts down the computer after 10 minutes.
You can also use the following command to shut down after five minutes:
shutdown /s /t 300
The shutdown timer is measured in seconds.
Method 3: Use PowerShell
PowerShell can also execute the Windows shutdown command.
- Open Start.
- Search for PowerShell or Windows PowerShell.
- Open it.
- Enter:
shutdown /s /t 3600
- Press Enter.
The computer will shut down after one hour.
This works because PowerShell can execute the standard Windows shutdown command.
You can use the same calculation for different time periods.
For example:
- 5 minutes =
300 - 10 minutes =
600 - 30 minutes =
1800 - 1 hour =
3600 - 2 hours =
7200 - 3 hours =
10800
Method 4: Create a Desktop Shutdown Timer Shortcut
If you frequently shut down your computer after a specific amount of time, you can create a desktop shortcut.
- Right-click an empty area of the desktop.
- Select New > Shortcut.
- Enter a command such as:
shutdown.exe /s /t 3600
- Select Next.
- Enter a name such as Shutdown After 1 Hour.
- Select Finish.
You can now double-click the shortcut whenever you want to schedule the shutdown.
To create different timers, make separate shortcuts with different values.
For example, you could create shortcuts for 30 minutes, one hour, and two hours.
Method 5: Create a Shortcut to Cancel Shutdown
If you accidentally schedule a shutdown or finish your work earlier, you can cancel the pending shutdown.
The command is:
shutdown /a
You can run it through the Run dialog, Command Prompt, or PowerShell.
To make cancellation easier, you can also create a desktop shortcut.
- Right-click the desktop.
- Select New > Shortcut.
- Enter:
shutdown.exe /a
- Select Next.
- Name the shortcut Cancel Shutdown.
- Select Finish.
If a shutdown timer is active, running this command can abort the scheduled shutdown.
Method 6: Schedule Shutdown at a Specific Time With Task Scheduler
If you want Windows to shut down at a particular clock time rather than after a certain number of minutes, Task Scheduler provides more control.
- Open Start.
- Search for Task Scheduler.
- Open it.
- Select Create Basic Task.
- Enter a name such as Automatic Shutdown.
- Select Next.
- Choose the desired trigger.
- Set the date and time.
- Select Start a program.
- Select Next.
- In the program field, enter:
shutdown.exe
- In the arguments field, enter:
/s /f
- Select Next.
- Review the task.
- Select Finish.
The /s option tells Windows to shut down.
The /f option forces running applications to close. Use this carefully because unsaved work can be lost.
If you want Windows to shut down at a regular time, Task Scheduler can also be configured with recurring triggers.
Method 7: Shut Down After a Download or Long Task
The basic shutdown command can be useful when you want the computer to turn off after a long-running task.
For example, if you start a download and estimate that it will finish in two hours, you can schedule:
shutdown /s /t 7200
Windows will continue running normally while the timer counts down.
If the task finishes earlier, use:
shutdown /a
to cancel the pending shutdown.
Be careful when estimating the required time. If the computer shuts down before a program finishes, the task may be interrupted.
For important downloads, backups, file transfers, or installations, it is better to leave additional time rather than setting the timer too close to the expected completion time.
Method 8: Schedule Shutdown With a Batch File
If you regularly use the same shutdown timer, you can create a simple batch file.
- Open Notepad.
- Enter:
shutdown /s /t 3600
- Select File > Save As.
- Give the file a name such as:
shutdown1hour.bat
- Change the file type to All files if necessary.
- Save the file.
Double-clicking the batch file will schedule the shutdown.
You can create additional batch files for different timers.
For example:
shutdown /s /t 1800
for 30 minutes, or:
shutdown /s /t 7200
for two hours.
How to Calculate the Shutdown Timer
The /t value uses seconds rather than minutes or hours.
Use this basic calculation:
Minutes × 60 = seconds
For hours:
Hours × 60 × 60 = seconds
Examples:
| Time | Command |
|---|---|
| 5 minutes | shutdown /s /t 300 |
| 10 minutes | shutdown /s /t 600 |
| 15 minutes | shutdown /s /t 900 |
| 30 minutes | shutdown /s /t 1800 |
| 1 hour | shutdown /s /t 3600 |
| 2 hours | shutdown /s /t 7200 |
| 3 hours | shutdown /s /t 10800 |
This makes it easy to create a shutdown timer for almost any duration.
How to Check or Cancel a Scheduled Shutdown
After scheduling a shutdown, Windows may display a notification indicating that the computer is going to shut down.
If you want to cancel it, open Run by pressing Windows + R and enter:
shutdown /a
Press Enter.
If a shutdown is currently scheduled, Windows will abort it.
If no shutdown is pending, Windows may report that no shutdown was scheduled.
Important Things to Remember
A normal shutdown may close applications and give them an opportunity to respond. If you use the /f option, Windows forces running applications to close.
For example:
shutdown /s /f /t 3600
This schedules a forced shutdown after one hour.
Do not use /f unless you understand the risk of losing unsaved work.
Before leaving the computer unattended, save important documents and make sure no application is waiting for user input.
Conclusion
Windows 11 and Windows 10 make it easy to automatically shut down a computer after a specific amount of time. For a simple one-time timer, the shutdown /s /t command is usually the easiest option. You can run it through the Run dialog, Command Prompt, or PowerShell.
If you frequently use shutdown timers, a desktop shortcut or batch file can make the process faster. For shutdowns that need to happen at a particular time or on a recurring schedule, Task Scheduler provides more control.
Remember that the shutdown timer is specified in seconds, and you can cancel a pending shutdown at any time with the shutdown /a command.
FAQs
1. How do I automatically shut down Windows after one hour?
Press Windows + R, enter shutdown /s /t 3600, and press Enter. Windows will schedule a shutdown after one hour.
2. How do I cancel an automatic shutdown?
Press Windows + R, enter shutdown /a, and press Enter. This cancels a pending shutdown timer.
3. Can I schedule Windows to shut down at a specific time?
Yes. You can use Task Scheduler to create a task that runs shutdown.exe at a specific time.
4. Will automatic shutdown close my programs?
A normal shutdown can close running applications as Windows shuts down. If you use the /f option, Windows forces applications to close, which can cause unsaved work to be lost.
Quick Summary
- Use
shutdown /s /t 3600to shut down Windows after one hour. - Change the number of seconds to set a different delay.
- Use
shutdown /ato cancel a scheduled shutdown. - Use Task Scheduler when you need a shutdown at a specific time or on a recurring schedule.





