Unable to wake up the pc from sleep through an event/task.

Page 1 of 2 12 LastLast
  1. Technewbie's Avatar
    Posts : 36
    Windows 10 Pro, 20H2, 19042.867
       #1

    Unable to wake up the pc from sleep through an event/task.


    [ Windows 10 Pro, 20H2, 19042.867 ]

    Hello all o/

    I created the following task using the task scheduler:
    [ Trigger I used:
    Begin the task: On an event
    Log: Microsoft-Windows-NetworkProfile/Operational
    Source: NetworkProfile
    Event ID: 10001

    Action when the task is triggered:

    run cmd.exe ]
    It's working as it is supposed to when the pc is on, the problem is that I cannot get it to work while the pc is in sleep mode.
    explained in #2

    I should note that creating a scheduled task on the other hand wakes up the pc from sleep:
    [ Trigger I used:
    Begin the task: On a Schedule
    at 11pm

    Action when the task is triggered:

    run cmd.exe ]

    I've tried every combination of settings for the task, and it just won't run/wake up from sleep.

    If you are wondering what's the use of the above task,
    I have frequent power outages in my area so I'm using my LAN connection as a trigger & by replacing the action "cmd.exe with shutdown /s" I'm shutting down my pc, until the time I get a new UPS ;-;.
    The issue arises only when the pc sleeps, I can just disable sleep but I frequently go afk so I don't want the pc to stay on the whole time, attached some screenshots for more info, I would appreciate any help/solution thank you :D.
    Attached Thumbnails Attached Thumbnails Unable to wake up the pc from sleep through an event/task.-screenshot-15-.png   Unable to wake up the pc from sleep through an event/task.-screenshot-14-.png   Unable to wake up the pc from sleep through an event/task.-screenshot-13-.png   Unable to wake up the pc from sleep through an event/task.-screenshot-12-.png   Unable to wake up the pc from sleep through an event/task.-screenshot-11-.png  

    Unable to wake up the pc from sleep through an event/task.-screenshot-20-.png   Unable to wake up the pc from sleep through an event/task.-screenshot-19-.png   Unable to wake up the pc from sleep through an event/task.-screenshot-18-.png   Unable to wake up the pc from sleep through an event/task.-screenshot-17-.png   Unable to wake up the pc from sleep through an event/task.-screenshot-16-.png  

    Last edited by Technewbie; 2 Weeks Ago at 12:09.
      My Computer

  2. Try3's Avatar
    Posts : 7,390
    Windows 10 Home x64 Version 20H2 Build 19042.868
       #2

    Does that Event [Network disconnection] happen whilst the computer is asleep?
    - I do not understand how it can.
    - It does not on mine.
    - It happens during the act of sending the computer to sleep but not whilst it is asleep.

    This would be a different issue altogether if we were discussing a computer that used S0 Modern standby.

    If I have understood correctly, you are trying to detect the loss of mains power and want to shut the computer down when that happens.
    I do not know what sort of computer you have but there would have to be something powering the computer to take any action at all when mains power was lost. Perhaps your reference to a 'new' UPS means you have a UPS already but are replacing it with a better one?

    Denis
      My Computer

  3. Technewbie's Avatar
    Posts : 36
    Windows 10 Pro, 20H2, 19042.867
    Thread Starter
       #3

    Try3 said:
    Perhaps your reference to a 'new' UPS means you have a UPS already but are replacing it with a better one?

    Denis
    Yeah, sorry forgot to mention that. That's what I intend to do, my ups batteries are almost dead where they can hold charge for just 5 min. So what I want to do is execute the task when the internet is disconnected while pc is sleeping.
    Code:
    C:\Users\srive>powercfg /a
    The following sleep states are available on this system:
        Standby (S3)
    
    The following sleep states are not available on this system:
        Standby (S1)
            The system firmware does not support this standby state.
    
        Standby (S2)
            The system firmware does not support this standby state.
    
        Hibernate
            Hibernation has not been enabled.
    
        Standby (S0 Low Power Idle)
            The system firmware does not support this standby state.
    
        Hybrid Sleep
            Hibernation is not available.
    
        Fast Startup
            Hibernation is not available.
    My desktop only supports s3 standby as u can see, so no It doesn't support s0/modern standby so I should be able to execute the task in sleep, right?

    or am I getting something wrong here, since I assumed since I can use Wake on LAN, I should be able to wake up the pc and execute task when its sleeping. Thanks for the quick reply :D.
      My Computer

  4. Try3's Avatar
    Posts : 7,390
    Windows 10 Home x64 Version 20H2 Build 19042.868
       #4

    Technewbie said:
    ... so I should be able to execute the task in sleep, right?
    Check Event viewer for that Event.
    I do not think you will find it happening during sleep.
    So you do not have any trigger for running a task.

    Technewbie said:
    … or am I getting something wrong here, since I assumed since I can use Wake on LAN, I should be able to wake up the pc and execute task when its sleeping.
    Sleep remains just that - sleep.
    WOL is a special case involving specific capabilities of the network adapter hardware itself.
    - The adapter hardware continues to see signals when the computer is asleep and can detect the magic packet that initiates WOL.

    Denis
      My Computer

  5. Berton's Avatar
    Posts : 10,489
    Win10 Pro Versions 2004 and 2009/20H2, Win10 Pro IP_Dev, Win10 Home 1909
       #5

    Reading this reminded of a time I worked in a shop back in the latter half of the '90s that maintained Dial-Up Modem service for an ISP. We had an APC power controller where we could log in from home and reset/reboot computers by turning the power off then back on but the main thing was to set the computers' BIOS to restart upon power failure rather than the default of remaining off.
      My Computers

  6. Technewbie's Avatar
    Posts : 36
    Windows 10 Pro, 20H2, 19042.867
    Thread Starter
       #6

    Try3 said:
    Does that Event [Network disconnection] happen whilst the computer is asleep?
    - I do not understand how it can.
    - It does not on mine.
    - It happens during the act of sending the computer to sleep but not whilst it is asleep.
    Denis
    No, I want that to happen during the sleep so I tried by disconnecting the ethernet wire but the task is not executed ;~;. Do u mean network is disconnected when the pc goes to sleep :o, I thought it stays on as it keeps on blinking even in sleep...

    - - - Updated - - -

    Try3 said:
    Check Event viewer for that Event.
    I do not think you will find it happening during sleep.
    So you do not have any trigger for running a task.


    Sleep remains just that - sleep.
    WOL is a special case involving specific capabilities of the network adapter hardware itself.
    - The adapter hardware continues to see signals when the computer is asleep and can detect the magic packet that initiates WOL.

    Denis
    Ah! thanks for the clarification about WoL, regarding the event viewer I saw when the event ID's 10001(network disconnect) & 10000(connect) happen, I can confirm that the event 10001 is occuring right when pc is going to sleep and 10000 is happening when I manually wake it up like u said. So, I got a new question can we not keep the network on when the pc goes to sleep like we do in modern laptops and then when network disconnects it can execute the task? :o

    - - - Updated - - -

    Berton said:
    Reading this reminded of a time I worked in a shop back in the latter half of the '90s that maintained Dial-Up Modem service for an ISP. We had an APC power controller where we could log in from home and reset/reboot computers by turning the power off then back on but the main thing was to set the computers' BIOS to restart upon power failure rather than the default of remaining off.
    Oh! seems like a very interesting job considering it was in 90s :O
      My Computer

  7. Try3's Avatar
    Posts : 7,390
    Windows 10 Home x64 Version 20H2 Build 19042.868
       #7

    Technewbie said:
    No, I want that to happen during the sleep
    Forget the task. You have no trigger. The event does not happen during sleep.

    Technewbie said:
    Do u mean network is disconnected when the pc goes to sleep
    Yes. Look in Event viewer - it shows you in the very section that you are looking at - the sequence you have then referred to later in your post
    Technewbie said:
    I can confirm that the event 10001 is occuring right when pc is going to sleep

    Technewbie said:
    I thought it stays on as it keeps on blinking even in sleep...
    No. EventID 10001 tells you otherwise.

    Technewbie said:
    So, I got a new question can we not keep the network on when the pc goes to sleep like we do in modern laptops
    Even S0 Modern standby computers do not do this. They do not sleep at all.
    S0 Modern standby is an idle condition not a sleep state.

    Denis
      My Computer

  8. Try3's Avatar
    Posts : 7,390
    Windows 10 Home x64 Version 20H2 Build 19042.868
       #8

    I do not use any UPS but I thought that UPS contained some mechanism for triggering shutdown sequences in computers.
    - I thought that was the point of them - maintain power long enough for the computer to be shutdown.
    - Not knowing anything about UPS, I have no idea if they can shut sleeping computers down.

    Denis
      My Computer

  9. Berton's Avatar
    Posts : 10,489
    Win10 Pro Versions 2004 and 2009/20H2, Win10 Pro IP_Dev, Win10 Home 1909
       #9

    Technewbie said:
    Oh! seems like a very interesting job considering it was in 90s :O
    Yeah, got my first computer in '92, MS-DOS 5 with Windows 3.1, retired in late '94 then got a part-time job offer in a computer store a week later, started building computers a month later, been doing it ever since, mostly repair and training.
      My Computers

  10. Technewbie's Avatar
    Posts : 36
    Windows 10 Pro, 20H2, 19042.867
    Thread Starter
       #10

    Try3 said:
    Forget the task. You have no trigger. The event does not happen during sleep.


    Yes. Look in Event viewer - it shows you in the very section that you are looking at - the sequence you have then referred to later in your post




    No. EventID 10001 tells you otherwise.


    Even S0 Modern standby computers do not do this. They do not sleep at all.
    S0 Modern standby is an idle condition not a sleep state.

    Denis
    Yeah, I agree with everything about this. But I should mention that I tried replacing event id: 10001 with 27(When ethernet port is disconnected), unlike network it won't disconnect when pc goes to sleep, but disconnecting that when in sleep didn't work either. The weird thing in this particular way is that even tho I disconnected the ethernet wire when pc is in sleep state when I woke the PC after some it's noted in the event viewer that the event 27 occurred _after_ pc woke up from sleep & after 3 secs event 33(ethernet connection) took place. I thought this would work tho as event I'd: 27 seems like it won't be disconnected even in sleep as it should be on for WoL to work.

    - - - Updated - - -

    Try3 said:
    I do not use any UPS but I thought that UPS contained some mechanism for triggering shutdown sequences in computers.
    - I thought that was the point of them - maintain power long enough for the computer to be shutdown.
    - Not knowing anything about UPS, I have no idea if they can shut sleeping computers down.

    Denis
    Oh! Yeah only costly ups have that function at least in my area, the budget range ones do not contain any software to automatically shutdown the PC and ups on power loss hence my current situation :,( untill I get one with software ;-;

    - - - Updated - - -

    Berton said:
    Yeah, got my first computer in '92, MS-DOS 5 with Windows 3.1, retired in late '94 then got a part-time job offer in a computer store a week later, started building computers a month later, been doing it ever since, mostly repair and training.
    Oh wow so early into the computer field I was not even born at that point lol xD
    Last edited by Technewbie; 2 Weeks Ago at 13:26.
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 07:25.
Find Us




Windows 10 Forums