Prevent Windows from Sleeping

By  on  

I have a few processes on my Windows gaming PC that are critical but sometimes get impacted over night as Windows tells my beloved machine to tone it down. My machine has the necessary cooling so I'm happy to let the processes do their work.

There is a setting in the UI which allows you to prevent Windows from sleeping but disabling that didn't seem to work. Want to truly prevent sleep and hibernation? Open the Command Prompt app with "Run as Administrator" and use the following two commands:

C:\Windows\system32> powercfg.exe /h off

I've noticed better performance of those processes when I'm not using the PC so I think all is well! Keep those Windows processes rolling at max power!

Recent Features

  • By
    5 Ways that CSS and JavaScript Interact That You May Not Know About

    CSS and JavaScript:  the lines seemingly get blurred by each browser release.  They have always done a very different job but in the end they are both front-end technologies so they need do need to work closely.  We have our .js files and our .css, but...

  • By
    CSS vs. JS Animation: Which is Faster?

    How is it possible that JavaScript-based animation has secretly always been as fast — or faster — than CSS transitions? And, how is it possible that Adobe and Google consistently release media-rich mobile sites that rival the performance of native apps? This article serves as a point-by-point...

Incredible Demos

Discussion

  1. Eugene

    Thanks, a useful thing! The description looks a bit confusing though. You mention two commands, but there is only one command mentioned later.

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!