Want your computer to turn off automatically after a certain amount of time? Windows 10 and Windows 11 include built-in tools that allow you to set a shutdown timer without installing any additional software.
In this guide, we'll show you several ways to set a shutdown timer on Windows, including:
- How to use the shutdown command to turn off your PC automatically
- How to set a timer for 30 minutes, 1 hour or any other time
- How to cancel a scheduled shutdown
- How to create a desktop shortcut for a shutdown timer
- How to use Task Scheduler for automatic scheduled shutdowns
Sometimes you may want your computer to turn off automatically after a certain amount of time. For example, you might be downloading a large game overnight, watching a movie before bed or running a task that does not require you to stay at your computer. Instead of leaving your PC running for hours, Windows includes built-in tools that allow you to set a shutdown timer without installing any additional software.
The easiest method uses a simple command that tells Windows exactly how long to wait before shutting down. You can also cancel the timer at any time, create desktop shortcuts for commonly used timers or use Task Scheduler if you need your PC to shut down automatically at a specific time or on a recurring schedule. These methods work on both Windows 10 and Windows 11, making them useful for almost any modern Windows PC.
How to Set a Shutdown Timer Using the Run Command
The quickest way to set a shutdown timer is by using the Windows Run dialog. Press Windows + R on your keyboard to open Run, then enter the shutdown command followed by the number of seconds you want Windows to wait. The basic command is:
shutdown -s -t [seconds]
Replace [seconds] with the number of seconds before your computer should shut down. For example, if you want your PC to turn off after one hour, enter 3600, because one hour contains 3,600 seconds. After pressing Enter, Windows will schedule the shutdown and display a notification showing that the computer is set to turn off.
Shutdown Timer Examples
| Time | Command |
| 5 Minutes | shutdown -s -t 300 |
| 10 Minutes | shutdown -s -t 600 |
| 30 Minutes | shutdown -s -t 1800 |
| 1 Hour | shutdown -s -t 3600 |
| 2 Hours | shutdown -s -t 7200 |
| 3 Hours | shutdown -s -t 10800 |
How to Set a Shutdown Timer Using Command Prompt
You can use exactly the same command through Command Prompt. Open the Start menu, search for Command Prompt or cmd, and open the application. Then enter your preferred shutdown command. For example:
shutdown -s -t 3600
This will schedule your computer to shut down after one hour. Using Command Prompt can be useful if you are already working with Windows commands or want to include the shutdown command in a script. You do not normally need administrator privileges to schedule a standard shutdown timer for your own computer.
How to Cancel a Scheduled Shutdown
If you change your mind, Windows allows you to cancel a scheduled shutdown before the timer reaches zero. Open the Run dialog by pressing Windows + R, or open Command Prompt, and enter:
shutdown -a
The -a option stands for abort and cancels the currently scheduled shutdown. Windows should display a notification confirming that the shutdown has been cancelled. This is particularly useful if you accidentally entered the wrong number of seconds or decide that you still need to use your computer after setting the timer.
How to Create a Desktop Shortcut for a Shutdown Timer
If you regularly use the same shutdown timer, creating a desktop shortcut can save time. Instead of opening Run or Command Prompt every time, you can create an icon that starts the timer with a single click. Right-click an empty area of your desktop, select New, and then choose Shortcut. In the location field, enter the shutdown command with your chosen delay.
For example, to create a shortcut that shuts down your PC after one hour, enter:
shutdown.exe -s -t 3600
Click Next, give the shortcut a name such as Shutdown in 1 Hour, and then click Finish. You can repeat the process to create several shortcuts for different timers, such as 30 minutes, one hour or two hours. This can be particularly convenient if you often leave your PC downloading games, updates or large files.
How to Create a Cancel Shutdown Shortcut
You can also create a separate shortcut that immediately cancels a scheduled shutdown. Follow the same steps used to create a normal desktop shortcut, but enter the following command instead:
shutdown.exe -a
Name the shortcut something clear, such as Cancel Shutdown. If you have several shutdown timer shortcuts on your desktop, this gives you a quick way to stop the timer without remembering or manually typing the command. Keeping the cancel shortcut nearby can also help prevent accidental shutdowns when you still have important work or applications open.
How to Schedule an Automatic Shutdown with Task Scheduler
If you want more control over when your PC turns off, Windows Task Scheduler can be used to create an automatic shutdown at a specific time. This method is useful if you want the computer to shut down every evening, after a scheduled task or according to another regular trigger. Search for Task Scheduler from the Start menu and open the application.
Create a new basic task and choose when you want it to run. You can select a one-time schedule, daily schedule or another available trigger depending on your needs. When Task Scheduler asks you to choose an action, select Start a program. Enter shutdown.exe as the program and use the appropriate arguments to control the shutdown behaviour.
-s
This tells Windows to shut down the computer when the scheduled task runs. After completing the setup, review the task carefully to make sure the time and frequency are correct. Task Scheduler is more flexible than a simple countdown timer, but it is also easier to configure incorrectly. It is therefore a good idea to test the task with a short delay before relying on it for an important schedule.
Does the Shutdown Timer Work on Windows 10 and Windows 11?
Yes. The shutdown command works on both Windows 10 and Windows 11, and the basic commands are the same. Whether you use the Run dialog, Command Prompt, a desktop shortcut or Task Scheduler, the underlying Windows shutdown functionality remains largely unchanged. This makes the guide useful even if you upgrade from Windows 10 to Windows 11 or use different PCs with different versions of Windows.
The appearance of menus and settings may differ slightly between Windows versions, particularly when creating shortcuts or opening Task Scheduler. However, the most important commands remain the same. For a simple countdown timer, you only need to remember shutdown -s -t followed by the number of seconds. To cancel it, use shutdown -a.
Important Things to Remember Before Using a Shutdown Timer
Before scheduling an automatic shutdown, make sure that important work has been saved. A shutdown timer is useful, but Windows will eventually attempt to close running applications when the timer expires. Some programs may warn you about unsaved files, while others could close without giving you enough time to react. If you are working on documents, editing videos or using software that processes important data, it is better to save everything before starting the timer.
- Save important files before the shutdown timer expires
- Remember that the timer uses seconds, not minutes
- Use
shutdown -ato cancel a scheduled shutdown - Create desktop shortcuts if you regularly use the same timer
- Use Task Scheduler when you need a recurring schedule
Final Thoughts
Setting a shutdown timer on Windows is simple and does not require downloading additional software. For most users, the fastest method is opening the Run dialog and using the command shutdown -s -t followed by the number of seconds you want to wait. Whether you need your PC to turn off after 30 minutes, one hour or several hours, Windows can handle the process with a single command.
If you use automatic shutdown regularly, creating desktop shortcuts can make the process even faster, while Task Scheduler provides more flexibility for recurring shutdowns at specific times. The most important command to remember is shutdown -a, which allows you to cancel the timer whenever your plans change. With these simple methods, you can easily control when your Windows 10 or Windows 11 computer turns off automatically.