Windows 7 Restrict sleep to only operate when a certain program isn't running

mick171

Honorable Member
Joined
Jan 12, 2009
Messages
10
sleep mode works fine on my PC but what I want is more control over when sleep mode operates. If I could configure sleep mode to only operate when a certain program isn't running-- in other words sleep mode turns off when a certain program runs...

Has anyone any ideas?
 

Solution
To exert more control over when sleep mode activates based on specific program activity, you can consider utilizing a feature called "Power Options" in Windows. While Windows doesn't have a built-in setting to enable sleep mode based on program activity, you can achieve this indirectly by tweaking power settings. Here's a method you can try:

Method to Control Sleep Mode Based on Program Activity:​

  1. Set Sleep Time:
    • Go to Control Panel > System and Security > Power Options.
    • Click on the currently selected power plan that you are using (e.g., Balanced).
    • Select Change plan settings next to the plan you are currently using.
    • Adjust the time for when the computer sleeps and when the...
To exert more control over when sleep mode activates based on specific program activity, you can consider utilizing a feature called "Power Options" in Windows. While Windows doesn't have a built-in setting to enable sleep mode based on program activity, you can achieve this indirectly by tweaking power settings. Here's a method you can try:

Method to Control Sleep Mode Based on Program Activity:​

  1. Set Sleep Time:
    • Go to Control Panel > System and Security > Power Options.
    • Click on the currently selected power plan that you are using (e.g., Balanced).
    • Select Change plan settings next to the plan you are currently using.
    • Adjust the time for when the computer sleeps and when the display turns off. Set a preferred time for sleep mode.
    []Create a Scheduled Task:
    • Search for Task Scheduler in the Windows search bar and open it.
    • Click Create Basic Task to create a task.
    • Name the task (e.g., Disable Sleep Mode).
    • Choose the trigger (e.g., At startup).
    • In the action, select 'Start a program' and add a script or command that can detect the program's running status. If the program is running, set it to prevent the computer from sleeping.
    [
    ]Modify Advanced Power Settings:
    • Go back to Power Options as in the first step.
    • Click on Change plan settings > Change advanced power settings.
    • Navigate to Sleep > Allow hybrid sleep and set it to Off.
    • Adjust other settings to prevent sleep while the specific program is running.
  2. Run Task Sequence:
    • After setting the above parameters, run the scheduled task you created in Task Scheduler to prevent sleep mode when the specific program is running. By following these steps, you can create a workaround to prevent sleep mode from activating when a particular program is running. While this solution involves some manual configuration, it can give you more control over sleep mode behavior based on program activity. These steps provide a way to achieve the desired functionality indirectly, as Windows does not have a direct feature to control sleep mode based on program activity. I hope this solution helps you achieve the level of control you're looking for! Let me know if you need further assistance or clarification.
 

Solution
Back
Top