Leaving your computer running longer than necessary can waste electricity, reduce battery life on laptops, and increase wear on hardware. Whether you’re downloading large files, installing updates, rendering videos, or simply want your PC to turn off automatically before you go to bed, Windows includes several built-in ways to schedule an automatic shutdown. You don’t need to install third-party software, as tools like Command Prompt, Run, PowerShell, and Task Scheduler can handle the task.
If you later decide you don’t want the computer to shut down, Windows also lets you cancel a scheduled shutdown with a simple command.
In this guide, you’ll learn the best methods to automatically shut down a Windows 11 or Windows 10 PC after a specific amount of time.
Why Schedule an Automatic Shutdown?
Automatically shutting down your PC can be useful in many situations.
Common reasons include:
- Save electricity.
- Shut down after downloads finish.
- Turn off the PC overnight.
- Prevent unnecessary hardware usage.
- Save laptop battery life.
- Complete long-running tasks before shutting down.
- Automatically power off after work.
- Improve security by not leaving the PC running.
Method 1: Schedule a Shutdown Using the Run Dialog
The quickest way to schedule an automatic shutdown is by using the Run dialog.
- Press Win + R to open Run.
- Type the following command:
shutdown -s -t 3600
- Press Enter.
The number 3600 represents the time in seconds before shutdown. In this example, the computer will shut down after one hour.
Some common values include:
- 300 = 5 minutes
- 600 = 10 minutes
- 1800 = 30 minutes
- 3600 = 1 hour
- 7200 = 2 hours
Windows will display a notification indicating when the PC will shut down.
Method 2: Use Command Prompt
Command Prompt provides the same functionality and is useful if you prefer working with commands.
- Search for Command Prompt.
- Open it.
- Run:
shutdown -s -t 1800
This example schedules a shutdown after 30 minutes.
You can replace 1800 with any number of seconds you prefer.
Method 3: Schedule Auto Shutdown Using Windows PowerShell
PowerShell also supports the Windows shutdown command.
- Open Windows PowerShell.
- Type:
shutdown -s -t 5400
- Press Enter.
This command shuts down the computer after 90 minutes.
PowerShell doesn’t require any special syntax because it uses the same Windows shutdown utility.
Method 4: Create an Automatic Shutdown Task in Task Scheduler
Task Scheduler allows you to automate shutdowns at a specific date or recurring schedule.
- Search for Task Scheduler.
- Click Create Basic Task.
- Enter a task name.
- Click Next.
- Choose a schedule such as:
- Daily
- Weekly
- Monthly
- One time
- Select the desired time.
- Choose Start a Program.
- Enter:
shutdown
For Arguments, type:
-s
Finish the wizard.
Windows will automatically shut down according to your chosen schedule.
Method 5: Create a Desktop Shortcut for Auto Shutdown
If you frequently schedule shutdowns, a desktop shortcut saves time.
- Right-click the desktop.
- Select New > Shortcut.
- Enter:
shutdown.exe -s -t 1800
- Click Next.
- Name the shortcut.
- Click Finish.
Double-clicking the shortcut schedules the shutdown instantly.
You can create multiple shortcuts with different timers.
Method 6: Cancel a Scheduled Shutdown
If you change your mind before the timer expires, Windows lets you cancel the shutdown.
Open Run (Win + R) or Command Prompt.
Type:
shutdown -a
Press Enter.
If successful, Windows displays a confirmation that the scheduled shutdown has been canceled.
Method 7: Use a Batch File
You can automate shutdowns using a simple batch file.
- Open Notepad.
- Enter:
shutdown -s -t 3600
- Save the file with a .bat extension.
Whenever you run the batch file, Windows schedules the shutdown automatically.
You can edit the timer at any time by modifying the number of seconds.
Method 8: Check for Applications Preventing Shutdown
Some applications prevent Windows from shutting down if unsaved work exists.
Before relying on automatic shutdown:
- Save open documents.
- Close important applications.
- Complete file transfers.
- Exit programs that may interrupt shutdown.
This reduces the chance of Windows waiting for user confirmation.
Method 9: Disable Fast Startup if Shutdown Doesn’t Complete
Fast Startup occasionally causes shutdown-related problems.
To disable it:
- Open Control Panel.
- Go to Power Options.
- Select Choose what the power buttons do.
- Click Change settings that are currently unavailable.
- Uncheck Turn on fast startup.
- Save the changes.
Test automatic shutdown again afterward.
Method 10: Repair Windows System Files
If scheduled shutdown commands fail repeatedly, Windows system files may be damaged.
Open Command Prompt as Administrator.
Run:
sfc /scannow
After the scan completes, run:
DISM /Online /Cleanup-Image /RestoreHealth
Restart the computer after both commands finish.
These tools repair corrupted system files that may interfere with Windows shutdown functions.
Conclusion
Scheduling an automatic shutdown in Windows 11 or Windows 10 is a simple way to save energy, protect your hardware, and ensure your computer powers off after completing lengthy tasks. Whether you use the Run dialog, Command Prompt, PowerShell, Task Scheduler, or a desktop shortcut, Windows provides several built-in options without requiring third-party software. If you no longer need the scheduled shutdown, the shutdown -a command lets you cancel it instantly. By using these methods and keeping your system updated, you can automate shutdowns safely and conveniently.
Frequently Asked Questions
How do I automatically shut down Windows after a certain time?
Use the command shutdown -s -t <seconds> in the Run dialog, Command Prompt, or PowerShell. Replace <seconds> with the desired delay in seconds.
How do I cancel a scheduled shutdown?
Run the following command before the timer expires:
shutdown -a
This immediately cancels the pending shutdown.
Can I schedule Windows to shut down every day?
Yes. Use Task Scheduler to create a recurring task that runs the shutdown -s command daily, weekly, or on another schedule.
Does automatic shutdown close open programs?
Yes. Windows attempts to close running applications during shutdown. To avoid losing unsaved work, save your files before the scheduled shutdown time.



