Schedule an Automatic Shutdown in Windows 11 & 10 (Timer, Daily, No Apps)
To shut down Windows automatically after a delay, press Windows + R, type shutdown /s /t 3600 (the number is seconds, so 3600 is one hour), and press Enter. To cancel, run shutdown /a. To shut down at the same time every day, open Task Scheduler, choose Create Basic Task, pick Daily and a time, set the action to Start a program with shutdown as the program and /s /t 60 as the arguments. No extra apps are needed. Here is the setting that makes most scheduled shutdowns fail silently: by default a Task Scheduler task runs only when you are signed in and only if the PC is on mains power. Turn on Run whether user is logged on or not and clear Start the task only if the computer is on AC power, and the schedule works every night.
Ethan's son leaves his gaming PC on overnight more often than not, and the electricity bill and the fan noise from the hallway had become a family topic. Ethan set up a nightly shutdown with Task Scheduler and was pleased, until it worked on Monday and did nothing on Tuesday. At Jake's shop, the Tuesday mystery took one look: Ethan's son had signed out on Tuesday and left the PC at the sign-in screen, and the task was set to run only when a user was signed in. One checkbox later, the PC switched itself off every night at 11:30 p.m. with a one-minute warning, signed in or not. This page covers every way to schedule a shutdown, and the settings that make it reliable.
A scheduled shutdown closes apps like a normal shutdown, so unsaved work can be lost. Always give a warning period, save often, and tell anyone else who uses the PC that it switches off at a set time.
Ways to shut down automatically
| Method | Best for | Survives restart? |
|---|---|---|
| shutdown /s /t seconds | A one-off timer tonight | No |
| Timer shortcuts on the desktop | One-click 30-minute or 1-hour timers | No |
| Task Scheduler, daily or weekly | Bedtime or office-closing shutdowns | Yes |
| Task Scheduler, on idle | Shut down when nobody has used the PC for a while | Yes |
| App's own "shut down when done" | After a download, render or backup | Per job |
| Family Safety screen time | Children's bedtime limits | Yes |
For most homes, the first and third rows cover everything: a quick timer when you need one tonight, and a Task Scheduler task for the PC that should switch off every night without anyone remembering.
Shut down after a delay (one-off timer)
- Press Windows + R to open Run, or open Terminal.
- Type
shutdown /s /t 1800and press Enter. Use the number of seconds you want. - Windows shows a notification that it will shut down at the scheduled time.
| Delay | Command |
|---|---|
| 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 |
| Maximum | shutdown /s /t 315360000 (10 years) |
Add a message with /c, such as shutdown /s /t 3600 /c "Bedtime in one hour. Save your game."; it appears in the warning. Use /r instead of /s to restart rather than shut down. A one-off timer is forgotten if the PC restarts before it fires.
To check the time a pending shutdown is due, look at the notification Windows showed when you set it, or simply set it again: Windows reports that a shutdown is already scheduled, a reminder that one is pending. When in doubt, cancel with shutdown /a and set a fresh timer.
Cancel a scheduled shutdown
Press Windows + R, type shutdown /a, and press Enter. Windows confirms with a notification that the scheduled shutdown was canceled. This works for any pending timer set with the shutdown command, as long as it has not started. It does not remove Task Scheduler tasks; those fire again on their next schedule until you disable or delete them.
If several timers were set, one cancel clears the pending shutdown; Windows keeps only one scheduled shutdown at a time, and setting a new timer while one is pending shows an error until you cancel the first. That makes it easy to change your mind: cancel, then set the new delay.
Keyboard users can also open Terminal and type the same command; the result is identical.
Shut down every day at a set time (Task Scheduler)
- Press the Windows key, type Task Scheduler, and open it.
- Click Create Basic Task... in the Actions pane.
- Name it, such as Nightly shutdown, and click Next.
- Choose Daily (or Weekly to pick specific days), click Next, set the start date and time, such as 11:30 PM, and click Next.
- Choose Start a program, click Next.
- In Program/script, type
shutdown. In Add arguments, type/s /t 60 /c "Shutting down in 1 minute. Save your work.". - Check Open the Properties dialog for this task when I click Finish, and click Finish.
- In Properties, make the reliability changes in the next section, then click OK.
The 60-second delay gives a visible warning and a chance to cancel with shutdown /a if someone is still working.
For a family PC, tell everyone the shutdown time and put it somewhere visible, such as a note by the screen. People plan around a predictable time; surprises are what cause lost work and frustration.
Different times for weekdays and weekends
One task can have several triggers. In the task's Properties, open Triggers, click New, choose Weekly, check Monday to Thursday and set 10:30 PM, then add another trigger for Friday and Saturday at 11:59 PM and a third for Sunday. Each trigger runs the same shutdown action. This avoids juggling several tasks and keeps the household schedule in one place that is easy to adjust.
Triggers can also have an expiry date, set in each trigger's settings, which is useful for a school-break schedule that should stop on its own when school starts again.
A nightly routine with a batch file
For more than a shutdown, write a small batch file, such as nightly.bat, that copies the day's documents to a backup drive with robocopy, clears a temporary folder, and finally runs shutdown /s /t 120 /c "Nightly routine done. Shutting down in 2 minutes.". Point the scheduled task at the batch file instead of shutdown. Test it during the day first, with a longer delay, so you can cancel the shutdown if anything goes wrong.
Save the batch file somewhere permanent, such as C:\Scripts, rather than the desktop or Downloads, so a tidy-up never deletes it and breaks the task.
A good nightly routine stays short: copy what matters, tidy a temporary folder, shut down. Long, complicated scripts are harder to trust; if a step fails silently, you may not notice until you need the backup it was meant to make.
Make the scheduled shutdown actually run
In the task's Properties (right-click the task in Task Scheduler Library and choose Properties):
- General tab: choose Run whether user is logged on or not, and check Run with highest privileges. Windows asks for your password when you click OK. This is the fix for Ethan's Tuesday problem.
- Conditions tab: clear Start the task only if the computer is on AC power for laptops, or the task never runs on battery. Clear Start the task only if the computer is idle unless you want that.
- Settings tab: check Run task as soon as possible after a scheduled start is missed only if you want a missed shutdown to happen later; for bedtime shutdowns, leave it off so the PC does not shut down unexpectedly in the morning.
- Triggers tab: confirm the time and that the trigger is Enabled.
Test it: right-click the task and choose Run. You should see the one-minute warning; cancel with shutdown /a if you are mid-work.
Laptops have one more setting worth checking on the Conditions tab: Stop if the computer switches to battery power. Clear it, or a laptop that is unplugged at the wrong moment abandons the task halfway. On the Settings tab, Stop the task if it runs longer than can stay at its default; the shutdown command finishes in seconds.
Test your schedule safely
Before trusting a nightly task, test it during the day. Temporarily change the trigger to a few minutes from now, or right-click the task and choose Run. Watch for the warning notification, then cancel with shutdown /a if you do not want the PC off yet. Check the Last Run Result shows success. Then set the real time back. Testing once with the PC at the sign-in screen, rather than signed in, confirms the most common failure is fixed.
If the test shows a password prompt or an error about the user account, re-enter your password in the task's General tab; Windows needs it to run the task when you are not signed in.
Shut down when the PC has been idle
To shut down only when nobody is using the PC, create a task with an idle condition. In Task Scheduler, choose Create Task (not Basic), add a trigger On idle, and on the Conditions tab set Start the task only if the computer is idle for 30 minutes or an hour, and Wait for idle for a few hours. The action is the same shutdown command. Windows' idle detection counts keyboard and mouse input, and can be delayed by background activity, so idle tasks are less precise than a fixed time. A simpler alternative for most people is the sleep timer, which already puts an idle PC to sleep; see our guide to sleep and power settings.
Idle tasks also stop if someone touches the mouse or keyboard before the shutdown starts, and they can be set to restart when the PC becomes idle again, under the Conditions tab, which makes them well suited to shared PCs that are used at unpredictable times.
One-click timer shortcuts
- Right-click the desktop and choose New > Shortcut.
- Enter
shutdown /s /t 3600as the location, name it Shut down in 1 hour, and finish. - Make a second shortcut with
shutdown /anamed Cancel shutdown. - Change their icons under Properties > Change Icon, and pin them to the taskbar or Start if you use them often.
Two icons, one to start the timer and one to cancel it, are easier for family members than typing commands. Create extra shortcuts for 30 minutes or two hours as needed.
A handy extra is a shortcut for shutdown /r /t 0 labeled Restart now, for the times a restart is needed in a hurry.
Give the timer shortcut a keyboard shortcut in its Properties, such as Ctrl + Alt + T, and the countdown starts with one key combination from anywhere in Windows.
Shut down after a download, render or backup
Many apps that run long jobs include a "shut down when finished" option: video editors and encoders, backup tools, some download managers and game launchers. Check the app's settings or the job's progress window first; it is the most reliable method because it waits for the job, however long it takes. If the app lacks one, estimate generously and set a timer, or let the PC sleep later by setting the sleep timer longer than the job. Shutting down by timer risks cutting off a task that runs longer than expected.
When both are available, prefer the app's option over a timer; a timer guesses, while the app knows exactly when the job is done.
Sleep or hibernate on a schedule
Sometimes sleep is better than shutting down, because your apps stay open. For a scheduled hibernate, use shutdown /h as the task's arguments with shutdown as the program; it needs hibernation enabled. For sleep, the classic command is rundll32.exe powrprof.dll,SetSuspendState 0,1,0, but it hibernates instead of sleeping when hibernation is turned on, so test it on your PC. For most people, the built-in sleep timer, which sleeps the PC after a period of inactivity, is simpler and more reliable than a scheduled sleep.
A scheduled hibernate is a good fit for laptops that should be off overnight but pick up exactly where you left off in the morning, with every app and document still open.
Sign out on a schedule
On a shared PC you may want to sign a user out at a set time while leaving the PC on for others. Create a task that runs shutdown with the argument /l, set to run as that user and only when they are signed in. Their apps close and the PC returns to the sign-in screen. Warn them with a separate task a few minutes earlier, using msg * "Signing out in 5 minutes" where the msg command is available, or rely on a routine everyone knows.
Signing out closes the user's apps without saving, the same as a shutdown, so the same warning advice applies.
Shut down at low battery
Laptops can shut down automatically when the battery runs low, without any task. Open powercfg.cpl, click Change plan settings > Change advanced power settings, expand Battery, and set Critical battery action to Shut down or Hibernate, and Critical battery level to a percentage such as 5. Hibernate is usually better, since it saves your open work. This protects the battery and your files whenever the laptop is forgotten off the charger.
The Low battery action setting just above can stay at Do nothing; the low battery notification is enough warning, and the critical action is the safety net.
Limit a session's length
To shut a PC down a fixed time after someone signs in, such as two hours of gaming, create a task with the trigger At log on for that user and the action shutdown with /s /t 7200 /c "Two hours are up.". The timer starts at each sign-in. It is a simple tool; anyone with access to a command prompt can cancel it with shutdown /a, so for children, Family Safety's screen time limits are the sturdier choice.
For a shared family PC, the session timer applies only to the account it is set for, so it will not interrupt anyone else's session after the child signs out.
Remember that the timer resets at every sign-in, so signing out and back in starts a fresh two hours; it is a nudge, not a lock.
Schedule a restart instead
For PCs that stay on all the time, such as a home server or media PC, a scheduled weekly restart keeps Windows healthy without leaving it off. Use the same Task Scheduler steps with shutdown and the arguments /r /t 60, weekly, at a quiet time such as Sunday 4 a.m. Combine it with Windows Update's active hours, so updates install at the same time.
Avoid scheduling restarts while backups, game downloads or media recordings normally run; check the PC's busy hours first so the restart does not interrupt them.
A weekly restart also clears memory leaks from long-running apps and makes sure drivers and updates are fully applied, which keeps an always-on PC responsive.
Turn the PC back on automatically
Windows cannot turn on a PC that is fully off, but most desktops can. Enter the BIOS or UEFI setup (Delete, F2 or F10 at startup) and look for a power option such as RTC Alarm, Resume by RTC, Power On By RTC or Wake on Alarm. Enable it and set a time; the PC switches itself on daily. Combined with a nightly shutdown, the PC is ready every morning. Laptops rarely offer this. An alternative is to sleep rather than shut down at night and use a Task Scheduler task with Wake the computer to run this task to wake it in the morning; Fast Startup and hybrid settings can affect this, so test it.
Some motherboards also offer Power On by PCI-E or Wake on LAN, which let another device on the network turn the PC on; a phone app can then wake it when you need it, without a fixed schedule.
Bedtime shutdowns for children
For children's accounts, Microsoft Family Safety is the better tool: set a screen time schedule for each day, and when time is up, Windows locks the child's session, with a warning beforehand. It works across Windows and Xbox, lets children request more time, and does not affect other accounts on the PC. A Task Scheduler shutdown shuts down the whole PC for everyone, which is fine for a child's own computer but not a shared one. Our guide to screen time limits covers the Family Safety side.
Family Safety also emails parents a weekly activity report, which helps agree on a fair schedule rather than guessing.
Schedules in Family Safety can differ by day, such as earlier on school nights, and changes apply on every device the child uses with their account.
Can someone just cancel it?
Yes: any user who can open Run or a command prompt can type shutdown /a during the warning period, and a standard user can usually do so too. A scheduled shutdown is a convenience, not an enforcement tool. If the goal is a firm limit for a child, Family Safety's screen time is the right tool, because it is controlled from the parent's account and cannot be canceled from the child's PC.
On a PC used only by adults, that flexibility is a feature: anyone still working can cancel tonight's shutdown without changing the schedule for tomorrow.
Scheduled shutdown not working? Fixes
- Nobody was signed in: set Run whether user is logged on or not.
- The laptop was on battery: clear the AC power condition.
- The PC was asleep: tasks do not run during sleep unless Wake the computer to run this task is checked on the Conditions tab.
- The task is disabled: in Task Scheduler Library, check the Status column says Ready.
- Wrong arguments: the program must be
shutdownand the arguments/s /t 60, in separate boxes. - Password changed: tasks set to run when not signed in store your password; after changing it, edit the task and re-enter it.
- Check the History tab: enable Enable All Tasks History in the Actions pane, then read the task's History for errors.
- An app blocked shutdown: unsaved documents can hold up shutdown; add
/fto force apps to close, accepting that unsaved work is lost.
If none of these explain it, export the task (right-click > Export), delete it, and create it again from scratch with the steps above; a damaged task definition occasionally refuses to run even when every setting looks right.
Check when the PC actually shut down
Event Viewer records every shutdown. Open it, go to Windows Logs > System, and filter for event ID 1074; each entry says which program started the shutdown, such as shutdown.exe from Task Scheduler, and when. Event 6006 marks the clean shutdown itself. Comparing these with your schedule confirms the task is working, or shows that something else, such as Windows Update, triggered a restart instead.
Also look at the task's own Last Run Result column in Task Scheduler; 0x0 means it ran successfully, and other codes point to the problem, such as a wrong path or missing permission.
Seeing 1074 entries at times you did not schedule means something else is shutting the PC down; the entry names the program, which leads straight to the cause.
Schedule a shutdown on another PC
From an administrator account on your network, shutdown /s /m \\PCNAME /t 600 schedules a shutdown on another computer with a ten-minute warning, if that PC allows remote shutdown. For a regular schedule on a family member's PC, it is simpler to create the task on that PC itself. Our guide to remote shutdown covers permissions and firewall settings.
Remote shutdown needs the other PC to be awake and on the same network; it cannot switch on a PC that is already off.
For a quick check before trying, run ping PCNAME; if it does not answer, the PC is asleep, off or blocking network requests.
Force apps to close (and when not to)
Adding /f to the shutdown command, as in shutdown /s /f /t 60, closes apps without waiting for them, which guarantees the PC turns off even if a document is open with unsaved changes. That reliability comes at a cost: anything unsaved is lost. For a child's gaming PC or a media PC, /f is sensible. For a work PC, leave it off and let apps prompt; better to find the PC on in the morning than lose a day's work.
A middle ground is a longer warning: /t 300 gives five minutes to save, which is usually enough for anyone who sees the notification.
Unsaved Office documents are often recoverable through AutoRecover after a forced shutdown, but do not rely on it; save before the warning ends whenever you can.
Make sure the warning is seen
The shutdown warning is a notification, and Do not disturb, Focus sessions or full-screen games can hide notifications. If people miss the warning, use a longer delay so they see it when they next look, add a clear message with /c, or schedule a separate reminder task a few minutes earlier that opens a simple message. For children, a consistent bedtime they know about matters more than the notification itself.
A second, earlier task with a 15-minute warning message gives people plenty of time to wrap up before the real shutdown starts.
On PCs used by older relatives, a longer warning and a plain-language message, such as "The computer will turn off in 10 minutes", avoid confusion when the countdown appears.
Shut down after a program finishes
To shut down when a specific program closes, such as a long copy or a backup script, use a batch file with start /wait: start /wait "" "C:\Tools\backup.exe" on one line, then shutdown /s /t 120 on the next. The batch file waits until the program exits before starting the shutdown countdown. For copying files, robocopy runs inside the batch file directly, so the shutdown line simply follows it and runs when the copy completes.
Test the batch file with a short program, such as Notepad, before using it with a long job: open the batch file, close Notepad, and the countdown should start straight away.
Schedule shutdowns with PowerShell
For scripting, PowerShell can create the same task in one command block. In Terminal (Admin):
$a = New-ScheduledTaskAction -Execute "shutdown.exe" -Argument "/s /t 60"
$t = New-ScheduledTaskTrigger -Daily -At 11:30pm
Register-ScheduledTask -TaskName "Nightly shutdown" -Action $a -Trigger $t -User "SYSTEM" -RunLevel Highest
Running as SYSTEM means it works whether or not anyone is signed in, without storing a password. Remove it with Unregister-ScheduledTask -TaskName "Nightly shutdown". For a quick one-off delay in a script, Start-Sleep -Seconds 3600; Stop-Computer works too, as long as the window stays open.
To change the time later, run Set-ScheduledTask -TaskName "Nightly shutdown" -Trigger (New-ScheduledTaskTrigger -Daily -At 10:45pm), which replaces the trigger without recreating the task.
The same cmdlets list existing tasks too: Get-ScheduledTask | Where-Object TaskName -like "*shutdown*" shows any shutdown tasks on the PC, including ones someone else created, which is a quick way to explain a PC that keeps switching off on its own.
Scheduled shutdowns and Windows Update
If updates are pending when the scheduled shutdown runs, Windows may install them during shutdown, which takes longer. That is usually fine and even helpful. Set active hours under Settings > Windows Update > Advanced options to cover the times you use the PC, so update restarts happen outside them, and the nightly shutdown becomes a natural time for updates to finish.
Updates installed this way also mean less waiting in the morning, because the restart work is already done.
If you notice the PC restarting instead of shutting down on some nights, an update may have required a restart; check Update history the next morning.
What a nightly shutdown saves
A desktop PC left on overnight with the screen off typically draws tens of watts, more for gaming PCs whose graphics cards stay active. Over a year of nights, that adds up to a noticeable sum on an electricity bill, along with fan noise and component wear. A sleeping PC uses only a few watts, and a shut-down one almost nothing. A nightly shutdown or sleep schedule is one of the easiest savings a household can make, and it also means every morning starts with a fresh Windows session.
For a gaming PC that downloads updates overnight, a shutdown a little later in the night, after the launcher's update window, keeps games current while still saving most of the night's power.
To see your own numbers, a plug-in power meter between the PC and the wall shows exactly how much it uses on, asleep and off, which makes the case for a schedule very clear to the rest of the household.
Media PCs: shut down after the movie
For a PC connected to a TV, a timer is handy for falling asleep during a film: run shutdown /s /t 7200 before pressing play, or use a desktop shortcut. Some media players have their own sleep timer that stops playback and can shut down the PC when the playlist ends, which is better because it waits for the film rather than guessing its length. If the PC also serves other devices, such as a media server for phones, prefer a scheduled restart weekly over nightly shutdowns.
On TVs with HDMI-CEC, turning off the PC sometimes turns the TV to standby too, which makes a timer especially convenient for late-night viewing.
Pair the timer with the TV's own sleep timer, and the whole setup switches off together at the end of the night.
Laptops left asleep in a bag
A laptop that sleeps in a bag still slowly uses battery. To have it turn itself off after a while, set Hibernate after under Advanced power settings > Sleep, such as 3 hours on battery; the laptop sleeps when you close the lid and hibernates later, using no power from then on. This is often better than a scheduled shutdown for laptops, since it adapts to when you actually stop using it. Our guide to sleep and hibernate settings explains the timers.
Check the hibernate timer applies to On battery; when plugged in, longer or never is fine, since power is not a concern at a desk.
For laptops that travel, this setting matters more than any schedule: it keeps the battery from draining to zero over a weekend in a bag, and your work is waiting exactly as you left it when you open the lid again.
Timer apps vs the built-in tools
Many free "shutdown timer" apps offer countdowns and schedules with friendly buttons. They work, but each is another program to keep updated and trust, and some come bundled with unwanted extras. Everything they do can be done with the shutdown command, desktop shortcuts and Task Scheduler. If you prefer an app, choose one from a well-known developer or the Microsoft Store, and check what it installs.
If you already use an app with a timer feature, such as a media player's sleep timer or a download manager's "shut down when done", those are fine to keep; they are built for the job and already trusted.
Windows 10 differences
Everything on this page works on Windows 10 exactly the same: the shutdown command, Task Scheduler and its options, PowerShell, and BIOS power-on settings. Windows 10 reached end of support in October 2025, but scheduled shutdowns keep working on PCs that still run it.
Task Scheduler on Windows 10 looks identical, so instructions and screenshots for either version apply to both.
If you move from Windows 10 to Windows 11 with an upgrade, existing scheduled tasks carry over; after a clean install, export them first with Task Scheduler's Export option and import them afterward.
Shut down or sleep at night?
Both are fine for the hardware. A nightly shutdown uses the least power, gives a fresh start each morning and pairs well with update installs. Nightly sleep keeps your apps and documents open and resumes in seconds, but uses a little power and benefits from a weekly restart. Desktops that run downloads or backups overnight are better scheduled to shut down after those jobs finish. Laptops are usually best with sleep and a hibernate timer. Choose the one that matches how you use the PC rather than a rule.
Whichever you choose, the scheduled task makes it consistent, which is the real benefit: the PC is never accidentally left running all weekend.
Scheduled shutdowns on a work PC
On a work PC, check with IT before scheduling shutdowns. Many organizations install updates, run backups or deploy software overnight, and a shutdown can interrupt those jobs or leave the PC unpatched. Some company PCs are configured to wake at night for maintenance. If saving power matters, IT can usually set an energy policy that fits their maintenance windows instead of each person scheduling their own.
If you are allowed to schedule one, pick a time after the end of your working day and before the organization's maintenance window, and use a long warning so a late meeting does not end with the PC switching off mid-call.
Common mistakes to avoid
- Leaving the task set to run only when a user is signed in.
- Leaving the AC power condition on for a laptop.
- Typing the whole command into the Program box instead of splitting program and arguments.
- Using /t 0 with no warning on a PC that others use.
- Forcing apps closed with /f on a work PC, losing unsaved documents.
- Forgetting the task after a password change, so it silently stops running.
Each of these is quick to avoid at setup, and together they explain nearly every "my scheduled shutdown does not work" question.
For IT admins: scheduled shutdowns at scale
Energy policies. Use Intune or Group Policy to deploy a scheduled task running as SYSTEM, or use power management tools that shut down idle machines after hours. Give users warning with /c messages and a sensible delay, and exclude servers, kiosks and machines running overnight jobs.
Wake for maintenance. Pair shutdowns with Wake on LAN or BIOS RTC wake for maintenance windows, so patching still happens on schedule.
Reporting. Event 1074 from shutdown.exe in each device's System log confirms the scheduled shutdown ran, which is handy evidence when users report machines left on.
Scheduling an automatic shutdown: frequently asked questions
How do I shut down Windows after 1 hour?
Run shutdown /s /t 3600 in the Run box or Terminal.
How do I cancel a shutdown timer?
Run shutdown /a before the timer ends.
How do I schedule a daily shutdown?
Task Scheduler, Create Basic Task, Daily, Start a program: shutdown with arguments /s /t 60.
Why didn't my scheduled shutdown run?
Usually nobody was signed in or the laptop was on battery. Set Run whether user is logged on or not and clear the AC power condition.
Can I show a warning message?
Yes. Add /c "your message" to the shutdown command.
How do I schedule a restart?
Use /r instead of /s, such as shutdown /r /t 60 in a scheduled task.
Can Windows turn my PC on automatically?
Not from fully off. Use the BIOS RTC alarm setting, or sleep and a wake task instead.
What does /t mean?
The delay in seconds before shutdown. /t 0 means immediately.
What does /f do?
Forces apps to close without saving. Use it only where losing unsaved work is acceptable.
How do I make a shutdown timer shortcut?
Create a desktop shortcut with shutdown /s /t 3600 as the location, and another with shutdown /a to cancel.
Can I shut down when the PC is idle?
Yes, with a Task Scheduler task using an On idle trigger and idle conditions.
Will a scheduled shutdown wait for updates?
Pending updates may install during the shutdown, which takes a little longer.
How do I set bedtime for my child's account?
Use Microsoft Family Safety screen time schedules instead of shutting down the whole PC.
Do I need third-party shutdown timer apps?
No. The shutdown command and Task Scheduler do everything they do.
Does a shutdown timer survive a restart?
No. Use Task Scheduler for schedules that persist.
How do I see if my task ran?
Enable All Tasks History in Task Scheduler and check the task's History tab.
How do I delete a scheduled shutdown?
In Task Scheduler Library, right-click the task and choose Delete or Disable.
Can I schedule a shutdown with PowerShell?
Yes. Register-ScheduledTask with a shutdown action and a daily trigger, running as SYSTEM.
Why does my PC shut down in the morning instead?
Run task as soon as possible after a missed start is checked. Clear it for bedtime tasks.
Can I schedule shutdown on weekdays only?
Yes. Choose Weekly in the task and check Monday to Friday.
What is the maximum shutdown delay?
315360000 seconds, about ten years.
Will scheduled shutdown work during sleep?
Only if the task is set to wake the computer to run it.
Is shutting down every night good for my PC?
It is fine and saves power. Restart weekly if you usually sleep instead.
Ethan's hallway is quiet at night now. The gaming PC warns at 11:29, switches off at 11:30, and if his son is mid-match, a quick shutdown /a buys him time, which Ethan says is a fair compromise. The whole setup is one command and one scheduled task, both built into Windows. The only trick was the checkbox that lets the task run with nobody signed in, the setting behind most "it worked once" stories. Set it, test it, and the PC keeps its own bedtime.
📌 If you keep one line from this page
shutdown /s /t seconds for a one-off timer; Task Scheduler with shutdown /s /t 60 for every night.
Choose "Run whether user is logged on or not" and clear the AC power condition so the task never skips a night.
Revision note. Written October 2, 2026, rewriting our 2016 guide with reliable Task Scheduler settings and timer shortcuts. May your PC always switch off when it should.