Score:0

Temporarily stop Server 2012 from Sleeping

cv flag

Need to somehow stop a 2012 R2 Server from entering Sleep mode whilst running a batch file. When batch has finished it would be good to restore the server it's previous power settings. Is there perhaps a power Service that I could stop?

Edit: Forgot to say "Enable wake timers" is enabled but doesn't seem to help.

cn flag
You could try powercfg to switch power schemes. https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/powercfg-command-line-options
cv flag
Yep, that is what I am doing as a temporary work around. Unfortunately can't do that from the batch file though as I now realise that it is running on a different machine than the host which is the one going into sleep mode. I am using "sc" to start & stop other services on that host machine sucessfully which is why I was wondering if there is some Windows power saving service which could be switched off.
cn flag
Interesting, I would be inclined to create a scheduled task on the remote host, that can be run once/on demand.
cv flag
Interesting suggestion Greg, could schedule a task on the host to run say "SleepDisable.bat" at the correct time but still have the problem that when the batch file on the Apps Server has finished then need to run "SleepEnable.bat" on the host.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.