I am trying to make a my laptop wake from sleep and then go back to sleep after a few moments.
To wake the PC I scheduled a cmd.exe with the argument
/c exit and it works fine.
To sleep I use a bat file with the following lines:
ping 127.0.0.1 -n 15 > nul Rundll32.exe Powrprof.dll,SetSuspendState Sleep
The ping is to both a 15 second delay.
Both of these work individually but when combined it doesn't work correctly. When the PC is asleep I see it wake, although the screen remains off and then after the 15 second delay it doesn't go back to sleep.
What am I doing wrong if I want to take a sleeping PC, wake it for 15 seconds and then go back to sleep?
Thanks in advance.