Ever left your PC running overnight to download a massive game or render a video, only to worry about wasted electricity and heat? You can easily set your computer to turn itself off automatically at a specified time.
Quick Summary
- Schedule shutdown: Press
Win + R, then entershutdown -s -t [seconds](e.g.,shutdown -s -t 3600for 1 hour).- Cancel shutdown: Press
Win + R, then entershutdown -a.- Time conversion: 10 min = 600s, 30 min = 1800s, 1 hr = 3600s, 2 hrs = 7200s.
- Note: Open apps will be forced to close when the timer expires, so save your work in advance.
No Extra Software Needed: Use the Run Dialog

There is no need to download suspicious third-party timer programs. Windows 10, Windows 11, and Windows Server already include a built-in power management command: shutdown.
Just like setting a sleep timer on an air conditioner or fan, you can safely set an automatic power-off schedule using Windows native tools. Press Windows key + R to open the Run dialog in the bottom-left corner of your screen. Type a single command into this box or Command Prompt (CMD), and the timer starts immediately.
Time Conversion Table and Shutdown Commands

The standard syntax to schedule a shutdown is shutdown -s -t [seconds] (or shutdown /s /t [seconds]). Here, -s stands for shutdown, and -t specifies the delay time in seconds before powering off.
The time value must be entered in seconds. For example, if you want your PC to shut down in 1 hour, multiply 60 seconds by 60 minutes to get 3600. Common time conversions are listed below.
| Target Time | Seconds | Run Dialog (Win + R) Command |
|---|---|---|
| 10 minutes | 600 | shutdown -s -t 600 |
| 30 minutes | 1800 | shutdown -s -t 1800 |
| 1 hour | 3600 | shutdown -s -t 3600 |
| 2 hours | 7200 | shutdown -s -t 7200 |
| 5 hours | 18000 | shutdown -s -t 18000 |
When the delay time (/t) is greater than 0, Windows automatically applies the force-close option (/f) at the time of shutdown. Make sure to save open files, such as Word or Excel documents, before scheduling the timer to prevent data loss.
How to Cancel or Schedule a Restart

If you need to keep working or entered the wrong time, you can cancel the timer at any point. Press Windows key + R, enter the cancellation command shutdown -a (or shutdown /a), and press Enter.
Once submitted, a notification reading “Logoff is cancelled” will appear in the bottom-right corner of the taskbar, confirming that the scheduled shutdown is cancelled.
If you want to schedule a restart rather than a full shutdown—such as after running updates or backups—replace -s with -r: shutdown -r -t [seconds].
If you have an overnight download or rendering job running right now, press Win + R and enter shutdown -s -t 3600 to have your PC shut down automatically in 1 hour.
