1. Home
  2. Windows Tips
  3. Automatically shut down on idle on windows 10

How to Automatically Shut Down Windows 10 When Idle

Your computer goes to sleep if it’s idle for a certain amount of time. You can also set the system to enter hibernate mode if you prefer it over sleep mode. That said, people do still shut down their systems and if you tend to forget, you can automatically shut it down if it’s been idle for too long. All you need is a scheduled task to handle it. Here’s how to set it up.

A word of caution

A system is idle when there is no user activity and no system processes are active. It does not check for unsaved work on your system. If you happen to have a file open with unsaved work, the shut down is not going to save it first. On that note, some apps can and do prevent system shut down if they’re open with unsaved work. If you have an app like that open on your system, it can interfere with the task.

Shut down on idle

Open the Task Scheduler and click Create Task in the column on the left.

In the Create Task window, enter a name for the task  and make the following changes;

  • Enable Run with highest privileges
  • Set the Configure for dropdown to Windows 10 or Windows 11

Move to the Triggers tab. Click New at the bottom to add a new trigger. Use one of the following:

  • Recommended (simpler): Set Begin the task to On idle. This trigger fires whenever Windows detects the PC has been idle (you’ll still control the exact idle time in the Conditions tab below).
  • Alternative (works too): Set Begin the task to On a schedule, choose Daily, set Start time to 12:00:00 AM, enable Recur every 1 day, and enable Synchronize across time zones. This method relies on the schedule but still respects your idle settings.

Go to the Actions tab. Click New and set the following action.

  • Under Program/Script, enter shutdown.exe (you can also type shutdown).
  • Click Add arguments and enter /s /t 0 to shut down immediately when triggered. Optional: add /f to force-close apps, but this can cause data loss if files are unsaved.
  • Need hibernate instead? Use /h (e.g., /h by itself). See the Microsoft shutdown command reference for all switches.

Go to the Conditions tab and make the following changes;

  • Enable Start the task only if the computer is idle for and set the time. This is how long your computer must be idle before it shuts down. (You can go up to two hours.)
  • Set Wait for idle for to the same value so the task doesn’t wait longer than intended.
  • Recommended: enable Stop if the computer ceases to be idle and Restart if the idle state resumes so it won’t shut down if you return to the PC.
  • If it should run on desktops, leave Start the task only if the computer is on AC power unchecked. On laptops, you may want it checked.

Click OK, and when your system is idle for more than the set time, it will be shut down.

Windows 10/11 notes

  • Idle detection: Windows tracks keyboard/mouse inactivity and low CPU use. If media playback or background tasks keep the system “busy,” the task may wait. You can test quickly by setting a 5–10 minute idle window.
  • Unsaved work: Avoid /f unless you’re sure it’s safe. Without /f, Windows will try to let apps prompt you—those prompts can block shutdown.
  • Hibernate vs. shutdown: Prefer /h if you want quicker resume while saving power. Use /s for a full shutdown.

Troubleshooting & tips

  • Task never runs: In History for the task, check if it’s waiting on idle. If you used the daily schedule method, ensure the PC was on during that time. As a quick test, temporarily set a short idle time (e.g., 5 minutes).
  • Blocked by apps: Some programs intentionally prevent shutdown. Close them first or consider a second action that quits them safely before shutdown (avoid force-killing critical apps).
  • Wake to run: If you want this even while the screen is off/asleep, enable Wake the computer to run this task under Conditions (hardware dependent).
  • Command switches: For a restart use /r; for hybrid shutdown/fast startup use /hybrid with /s. See the official Microsoft shutdown command options.

As for apps that may block the shut down, you can find free apps that can quit all running apps on your system or you can create a script that do the same thing. In both cases, you can run the script or the app as an action for the task.

What’s New in This Update

  • Added Windows 11 support and clarified On idle trigger vs. daily schedule approach.
  • Specified correct shutdown.exe usage with arguments (/s /t 0, optional /f, and /h for hibernate).
  • Included recommended Conditions (Stop if not idle, Restart if idle resumes) for safer behavior.
  • Linked to the official Microsoft reference for all shutdown switches.

Last updated: 2025-10-09

3 Comments

  1. Hi Fatima – just stopped by to thank you for your solution – this worked for me. I was trying to set this up a different way for a different but similar reason…let me exp[lain for others:

    My goal was to schedule tasks that would both “Disable” my NIC upon going “Idle” and “Re-Enable” when the PC is unlocked by me; enabling worked fine…but “disabling” didn’t work and this is why…I originally set the trigger to Begin the task “on idle”…makes sense right? Wrong! Even though I set the “Conditions” the same as instructed here…it did not work. Very frustrating…until I saw your method of using the other trigger…”On a schedule”.

    This was the correct solution for me and works great…I did this for supreme security and trust me, no one is getting on your PC without a NIC. For anyone else who wants to run a similar schedule…this is what I did:

    1. Create two separate tasks as described above; name them ENABLE NIC & DISABLE NIC

    2. For the DISABLE schedule – set the trigger as described above > then set the Actions to “Start a Program” > then in the Program/script box type: netsh > then in the “add arguments” box type: interface set interface “Ethernet 3” admin=disable and click OK. Note* where I typed “Ethernet 3″…replace this with whatever your current NIC is (C:\Windows\System32\ncpa.cpl)

    3. Set the Conditions as described above as well…

    4. For the “Enable” schedule…set the Trigger to Begin the task: “On workstation unlock”>for a specific or any user>then the same as the previous…then set the Actions to “Start a Program” > then in the Program/script box type: netsh > then in the “add arguments” box type: interface set interface “Ethernet 3” admin=disable and click OK. Note* where I typed “Ethernet 3″…replace this with whatever your current NIC is (C:\Windows\System32\ncpa.cpl)

    5. There is no need for a condition unless you want one…and thats it

  2. I tried this setting but it doesn’t work. And I finally get it…

    1. On Edit trigger, Begin the task – select On idle
    2. On Edit Action, Add arguments (optional) i put /s

    I hope it will help…