Best built-in method: open Task Scheduler, create a daily or weekly trigger, then run C:\Windows\System32\shutdown.exe with arguments /s /t 0. This avoids the forced-close implication of a positive timeout but provides no countdown. Use a visual scheduler when you need a warning, cancellation and force-close kept off.
One-time timer or recurring schedule?
A one-time command such as shutdown /s /t 3600 starts a countdown measured from now. It does not mean “every night at 11:00 PM.” Recurring automation needs a calendar trigger that remains registered after the first run.
| Goal | Use | Why |
|---|---|---|
| Shut down once, one hour from now | Windows shutdown timer | Fastest built-in option |
| Shut down every day at 11:00 PM | Task Scheduler or daily profile | Calendar recurrence remains registered |
| Shut down Monday–Friday at 6:00 PM | Weekly trigger | Selects exact weekdays |
| Shut down only after the PC is idle | Idle condition | A fixed clock time may interrupt active work |
Method 1: schedule shutdown with Task Scheduler
Step 1: Open Task Scheduler
Press Start, search for Task Scheduler, and open it. Choose Create Task for full control. “Create Basic Task” also works for a simple daily schedule, but the full dialog exposes conditions and recovery settings that often determine whether a task runs reliably.
Step 2: Give the task an unmistakable name
Use a name such as Nightly PC Shutdown. Add a description with the intended time and owner. A precise name matters months later when you need to disable the correct task.
Step 3: Add the trigger
- Open the Triggers tab and select New.
- Choose On a schedule.
- Select Daily, Weekly or Monthly.
- Set the local start date and time.
- For weekly automation, select only the intended days.
- Keep Enabled selected and save the trigger.
Step 4: Add the shutdown action
On the Actions tab, create a Start a program action:
| Program/script | C:\Windows\System32\shutdown.exe |
|---|---|
| Add arguments | /s /t 0 |
| Start in | Leave blank |
This requests an immediate, non-explicitly-forced shutdown; an application with unsaved work may delay it. Microsoft documents that using a positive timeout such as /t 60 implies /f, even when you did not type /f. A positive timeout gives a cancellation window but can discard unsaved data at expiry. Task Scheduler alone cannot provide both that countdown and a guaranteed non-forced close.
Step 5: Review Conditions and Settings
- Wake the computer to run this task: enable only if you actually want the machine to wake for the schedule. Hardware and power-state support varies.
- Start the task only if the computer is idle: use this if a fixed time should not interrupt active keyboard or mouse use.
- Run task as soon as possible after a scheduled start is missed: consider whether shutting down immediately after a laptop wakes is desirable. For many personal PCs it is not.
- If the task fails, restart every…: a blind retry can create surprising shutdowns. Diagnose failures instead of enabling aggressive retries.
Step 6: Test without waiting until tonight
First test the trigger with a harmless temporary action, such as cmd.exe with arguments /c echo triggered>"%TEMP%\shutdown-task-test.txt". Move the trigger a few minutes ahead and confirm the file appears and History records the run. Restore the real shutdown action afterward.
Test the final /s /t 0 action only during a controlled window after saving and closing all work; it is immediate and cannot be canceled with shutdown /a. If you instead use a temporary positive timeout for a cancellation test, remember that it implies forced close and cancel well before expiry.
Optional: create recurring tasks with schtasks
Microsoft’s schtasks command can create the same basic schedules from a terminal. Run these in an appropriately privileged terminal and choose names that do not collide with existing tasks.
Query a task before changing or deleting it:
Command-line date and time parsing follows local Windows conventions. The graphical Task Scheduler is safer when locale, credentials or advanced conditions are involved.
Method 2: create a reusable visual shutdown profile
Free Auto Shutdown groups the action, trigger, warning and activation state in one profile. The five starter profiles are intentionally unarmed, so choosing one does not immediately schedule a power action.

Reliability checklist before you depend on the schedule
- Time zone: check Windows date, time and time zone.
- Sleep state: decide whether the PC should wake or whether a missed task should remain missed.
- User account: a Task Scheduler credential or permission change can stop a previously working task.
- Power source: laptop conditions can prevent tasks while on battery.
- Unsaved work: use
/t 0if you do not accept the positive-timeout forced-close implication, or use an application warning with force-close disabled. - Visibility: confirm the next run and active state rather than assuming a saved task is armed.
- Test: prove the trigger with a harmless action, then test the real power action during controlled downtime.
How to stop or change a recurring shutdown
For Task Scheduler, find the exact task, then choose Disable to preserve it or Delete to remove it. In Free Auto Shutdown, deactivate the active schedule before editing or deleting its profile. Running shutdown /a stops only a shutdown that is already pending; it does not remove tomorrow’s trigger.
See the complete scheduled shutdown cancellation guide when you do not know which system created the schedule.
Recurring shutdown FAQ
Can Windows shut down automatically every night?
Yes. Use a daily Task Scheduler trigger or a daily schedule profile. Test it at a near-future time before depending on it.
Will it run while the PC is asleep?
Only when the scheduler is allowed to wake the computer and the hardware/power state supports wake timers. Otherwise the task may be missed or run later, depending on its settings.
How do I schedule only weekdays?
Create a weekly trigger and select Monday through Friday. In schtasks, use /sc weekly /d MON,TUE,WED,THU,FRI.
How do I prevent unsaved work from being lost?
Use /t 0 if you do not accept the forced-close implication of a positive timeout, or use a visual warning that keeps force-close disabled. Test during controlled downtime.
The examples are for local Windows 11 and Windows 10 PCs. Managed workplace devices may enforce different permissions and policies.
