I want my laptop to sleep after an hour of being idle (and plugged in), but ONLY outside of work hours (eg: 8am-5pm Mon-Fri). I'm not trying to disable sleep entirely during work hours, it just has to be done manually (unless on battery).
What are the best ways to achieve this?
Some ideas I've had:
- Set the Power Plan settings to never sleep, and use the task scheduler to run a command to tell the PC to sleep under certain conditions. I'm not sure though if the logic can be set up in a way that disables the condition during a time window and checks for inactivity otherwise.
- Use the task scheduler to disable sleep-on-idle timer as part of the power plan at 8am, then set the time to 1 hour at 6pm. This solution would need to leave the On-battery sleep timer active at all times.
I'm specifically using Windows 10 on a laptop, but an ideal solution would work for other configurations as well.






