How to make my computer sleep after 1 hour idle only at night, every night?


Stoggr

New member
Local time
5:44 PM
Posts
1
OS
Windows 11
Hello there!

I want to make my computer sleep after 1 hour idle only from 23:00 - 08:00 every night.
The closest that I got is using the Task Scheduler and running a sleep command from there. But the settings confuse me and I don't know exactly how it works.

If someone can help me and tell me how I should configure the task it would be greatly appreciated.

Or if there is an easier way to do this/some software, that would be great also, thanks!
 
Windows Build/Version
Version 23H2 (OS build 22631.4317)

My Computer My Computer

At a glance

Windows 11
OS
Windows 11
Computer type
Laptop
Manufacturer/Model
Acer
You could change the sleep setting for the current power scheme with the powercfg command.

Code:
powercfg /change /standby-timeout-ac 60
powercfg /change /standby-timeout-dc 60

Create a scheduled task to run starting at 11:00 PM, repeating, for example, every hour, for 9 hours. That will take care of the sleeping at night.

Then to undo it, create a separate scheduled task that runs from 8:00 AM, repeating fourteen hours (to stop before 11 PM). Use the powercfg commands above, just changing the values to what you want during the daytime.

You can also run these scheduled tasks based on other events, but I'm trying to keep it simple here.
 

My Computer My Computer

At a glance

Windows 11 Enterprise 25H2
OS
Windows 11 Enterprise 25H2

Latest Support Threads

Back
Top Bottom