Solved Can't get a daily Shutdown working in Task Scheduler...


Peter B

Well-known member
Local time
3:51 PM
Posts
51
Location
West Yorkshire
OS
Windows 11 Pro 23H2 22631.3880
Having recently bought a new laptop, I configured a few daily tasks, all of which work except the daily Shutdown.

It just doesn't seem to wake up the machine from sleep, despite the button being checked to do so. Then, when I realise it's not happened and click my Touchpad, a message appears that it's closing down - and it does!

Driving me bonkers - any suggestions, please?
 

My Computer

System One

  • OS
    Windows 11 Pro 23H2 22631.3880
    Computer type
    Laptop
    Manufacturer/Model
    PC Specialist Initia 15.6"
    CPU
    Intel(R) Core(TM) i7-1195G7 @ 2.90GHz
    Memory
    16GB
    Graphics Card(s)
    Intel Iris Xe
    Screen Resolution
    1920 x 1080
    Hard Drives
    M2 PCIe NVMe 250GB
    Internet Speed
    80/20 Mbps
    Browser
    Microsoft Edge Version 126.0.2592.113 (Official build) (64-bit)
    Antivirus
    Microsoft Defender
    Other Info
    Macrium Reflect Home Edition v8.1.8110
I've just tested such a task in TS and it worked.

I set it to run
shutdown.exe /s /t 0 /f
and I did not use any fancy settings in the General tab.

Perhaps you could post screenshots of each of the task's properties tabs.

What power states do you have available? Run this command to find out
PowerCfg -a
If you have S0 Modern standby [aka S0 Low power idle] then your Task scheduler might only be allowed to run whilst your display is on if at all [S0 Modern standby kicks in when the display goes off].
If you have S0 Modern standby [aka S0 Low power idle] then you do not have S3 Sleep.


Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3447
Thanks Denis - that's exactly how it's set up, but when it comes to the time of shutdown, it doesn't happen - unless I click my touchpad.

I tried the powercfg -a command, but the window opens and closes before I can read it :mad:

I'll delete the task, recreate it and see what happens tonight, before I start posting screenshots.
 

My Computer

System One

  • OS
    Windows 11 Pro 23H2 22631.3880
    Computer type
    Laptop
    Manufacturer/Model
    PC Specialist Initia 15.6"
    CPU
    Intel(R) Core(TM) i7-1195G7 @ 2.90GHz
    Memory
    16GB
    Graphics Card(s)
    Intel Iris Xe
    Screen Resolution
    1920 x 1080
    Hard Drives
    M2 PCIe NVMe 250GB
    Internet Speed
    80/20 Mbps
    Browser
    Microsoft Edge Version 126.0.2592.113 (Official build) (64-bit)
    Antivirus
    Microsoft Defender
    Other Info
    Macrium Reflect Home Edition v8.1.8110
I tried the powercfg -a command, but the window opens and closes before I can read it
Open a Terminal window [the command works in both PS & Cmd prompt windows] and paste in that command.
The window will stay open and will show you the results.

Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3447
when it comes to the time of shutdown, it doesn't happen - unless I click my touchpad.
That's why I think S0 Modern standby might be getting in the way.
I suspect your use of the touchpad is returning the computer to a normal power state and that is allowing overdue triggering of the TS task.

Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3447
Does the attached explain anything?
 

Attachments

  • Screenshot (15).png
    Screenshot (15).png
    15 KB · Views: 11

My Computer

System One

  • OS
    Windows 11 Pro 23H2 22631.3880
    Computer type
    Laptop
    Manufacturer/Model
    PC Specialist Initia 15.6"
    CPU
    Intel(R) Core(TM) i7-1195G7 @ 2.90GHz
    Memory
    16GB
    Graphics Card(s)
    Intel Iris Xe
    Screen Resolution
    1920 x 1080
    Hard Drives
    M2 PCIe NVMe 250GB
    Internet Speed
    80/20 Mbps
    Browser
    Microsoft Edge Version 126.0.2592.113 (Official build) (64-bit)
    Antivirus
    Microsoft Defender
    Other Info
    Macrium Reflect Home Edition v8.1.8110
Peter,

Yes, it says that you have S0 Modern standby.
You do not have S3 Sleep, which is the sleep state we had all got to know over the years.

S0 Modern standby is not sleep. It is an idle condition that inhibits all activity except a few things that MS likes [such as the email app & Windows update].

I never liked S0 Modern standby and eventually disabled it.
Disable Modern Standby in Windows 10 and Windows 11 - ElevenForumTutorials
I did first try a halfway house of letting S0 Modern standby stay in place but with my display set to never go off so S0 Modern standby never started. I added a dark screensaver so the display would not be staring at me the whole time.
my latest S0 spiel - post #13 - ElevenForum

We can discuss either or both of these options, as you wish.

Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3447
I'm open to suggestions really - I currently have sleep enabled, though I added a screensaver with a lock screen, as without it, I noticed that exiting sleep didn't demand a password request.

The other tasks I run take place early morning when I'm using my machine - so I'd be happy to adopt whatever you suggest. without taking this discussion into a tome-sized document.
 

My Computer

System One

  • OS
    Windows 11 Pro 23H2 22631.3880
    Computer type
    Laptop
    Manufacturer/Model
    PC Specialist Initia 15.6"
    CPU
    Intel(R) Core(TM) i7-1195G7 @ 2.90GHz
    Memory
    16GB
    Graphics Card(s)
    Intel Iris Xe
    Screen Resolution
    1920 x 1080
    Hard Drives
    M2 PCIe NVMe 250GB
    Internet Speed
    80/20 Mbps
    Browser
    Microsoft Edge Version 126.0.2592.113 (Official build) (64-bit)
    Antivirus
    Microsoft Defender
    Other Info
    Macrium Reflect Home Edition v8.1.8110
I currently have sleep enabled
Peter,

You do not have sleep.
You have S0 Modern standby. It is not sleep.

My halfway house of stopping S0 Modern standby kicking in did work [display set to never turn off + a screensaver].
Disabling S0 Modern standby also works. For some users, disabling S0 Modern standby automatically enabled S3 Sleep. I was not so lucky.

Disabling S0 Modern standby is just a simple Registry change and it is easily reversible so you could try it then revert if you didn't like the results.

Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3447
You could try a 3rd party tool - that's particularly designed to work with any modern power features. For example "Wise Auto Shutdown" - which is free and there's even a portable version:


Sometimes tools designed for a specific task are a far better option - than Windows features like Task Scheduler - which has a general purpose and predefined parameters (since MS devs try to make it work with almost everything).
 

My Computer

System One

  • OS
    Windows 7 SP 16 (or Windows 11 SP 2 or Sun Valley 2)
    Computer type
    Laptop
    CPU
    Intel & AMD
    Memory
    SO-DIMM SK Hynix 15.8 GB Dual-Channel DDR4-2666 (2 x 8 GB) 1329MHz (19-19-19-43)
    Graphics Card(s)
    nVidia RTX 2060 6GB Mobile GPU (TU106M)
    Sound Card
    Onbord Realtek ALC1220
    Screen Resolution
    1920 x 1080
    Hard Drives
    1x Samsung PM981 NVMe PCIe M.2 512GB / 1x Seagate Expansion ST1000LM035 1TB
Denis, I've disabled it and attached a screenshot.

I tried the Wise software the other day, but that failed to work too.

I'll suck it and see what happens tonight - thank you for your assistance.
 

Attachments

  • Screenshot (16).png
    Screenshot (16).png
    15.6 KB · Views: 8

My Computer

System One

  • OS
    Windows 11 Pro 23H2 22631.3880
    Computer type
    Laptop
    Manufacturer/Model
    PC Specialist Initia 15.6"
    CPU
    Intel(R) Core(TM) i7-1195G7 @ 2.90GHz
    Memory
    16GB
    Graphics Card(s)
    Intel Iris Xe
    Screen Resolution
    1920 x 1080
    Hard Drives
    M2 PCIe NVMe 250GB
    Internet Speed
    80/20 Mbps
    Browser
    Microsoft Edge Version 126.0.2592.113 (Official build) (64-bit)
    Antivirus
    Microsoft Defender
    Other Info
    Macrium Reflect Home Edition v8.1.8110
For example "Wise Auto Shutdown"
If S0 Modern standby suppresses TS tasks then it will probably also suppress third-party tools.
S0 Modern standby is very aggressive as are all creations of Beelzebub.


All the best,
Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3447
I've disabled it
Sorry but you have not.
The new PowerCfg -a report is the same as the old one - it shows S0 Modern standby is enabled.

Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3447
I have attached a batch script that you can use to schedule shutdown of your computer.
 

Attachments

  • Schedule_Shutdown.bat
    1.5 KB · Views: 11

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    Erica6
    Memory
    Micron Technology DDR4-3200 16GB
    Graphics Card(s)
    NVIDIA GeForce RTX 3060
    Sound Card
    Realtek ALC671
    Monitor(s) Displays
    Samsung SyncMaster U28E590
    Screen Resolution
    3840 x 2160
    Hard Drives
    SAMSUNG MZVLQ1T0HALB-000H1
I have attached a batch script that you can use to schedule shutdown of your computer.
Sorry but it will not run during S0 Modern standby state.

Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3447
Sorry Denis - this is the result after I restarted the laptop. Thanks again.
 

Attachments

  • Screenshot (17).png
    Screenshot (17).png
    9.6 KB · Views: 12

My Computer

System One

  • OS
    Windows 11 Pro 23H2 22631.3880
    Computer type
    Laptop
    Manufacturer/Model
    PC Specialist Initia 15.6"
    CPU
    Intel(R) Core(TM) i7-1195G7 @ 2.90GHz
    Memory
    16GB
    Graphics Card(s)
    Intel Iris Xe
    Screen Resolution
    1920 x 1080
    Hard Drives
    M2 PCIe NVMe 250GB
    Internet Speed
    80/20 Mbps
    Browser
    Microsoft Edge Version 126.0.2592.113 (Official build) (64-bit)
    Antivirus
    Microsoft Defender
    Other Info
    Macrium Reflect Home Edition v8.1.8110
And now I'm really jealous.
You have S3 Sleep.
You have, in other words, a proper computer again.

How does your TS task behave now?
If it does not work at the first attempt, make an innocuous task and test that first - perhaps just a task that opens Notepad.

Best of luck,
Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3447
Just tested and all is hunky dory, than you.
 

My Computer

System One

  • OS
    Windows 11 Pro 23H2 22631.3880
    Computer type
    Laptop
    Manufacturer/Model
    PC Specialist Initia 15.6"
    CPU
    Intel(R) Core(TM) i7-1195G7 @ 2.90GHz
    Memory
    16GB
    Graphics Card(s)
    Intel Iris Xe
    Screen Resolution
    1920 x 1080
    Hard Drives
    M2 PCIe NVMe 250GB
    Internet Speed
    80/20 Mbps
    Browser
    Microsoft Edge Version 126.0.2592.113 (Official build) (64-bit)
    Antivirus
    Microsoft Defender
    Other Info
    Macrium Reflect Home Edition v8.1.8110
Peter,

I am glad it has all been resolved.
I remain jealous that disabling your S0 Modern standby enabled S3 Sleep for you.
My S0 Modern standby computer was just an additional one for travelling [it weighs less than 1Kg] and I am dreading the day I need to replace my main laptop.


All the best,
Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3447
Just an addendum to this...Task Scheduler kicks in perfectly now unless Sleep is activated, at which point not only does Task Scheduler not run, but the laptop won't wake up at all and only a hard shutdown via the power button will revive it. :eyeroll:
 

My Computer

System One

  • OS
    Windows 11 Pro 23H2 22631.3880
    Computer type
    Laptop
    Manufacturer/Model
    PC Specialist Initia 15.6"
    CPU
    Intel(R) Core(TM) i7-1195G7 @ 2.90GHz
    Memory
    16GB
    Graphics Card(s)
    Intel Iris Xe
    Screen Resolution
    1920 x 1080
    Hard Drives
    M2 PCIe NVMe 250GB
    Internet Speed
    80/20 Mbps
    Browser
    Microsoft Edge Version 126.0.2592.113 (Official build) (64-bit)
    Antivirus
    Microsoft Defender
    Other Info
    Macrium Reflect Home Edition v8.1.8110
Back
Top Bottom