0
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.
Thanks, but that doesn't really answer the question. If you must know, the computer fans are annoying, there is significant power draw, and in turn heat. The system still ages, with additional dust collection. It may also play sounds late at night. – Bort – 2019-10-14T19:11:19.190
There is no way (I have ever seen) to make Windows suspend at a specific point, only after an interval of time. So Task Manager at at specific time is your only real option – John – 2019-10-14T19:13:26.583
I don't want it to sleep at a "specific point", I want it to sleep after an interval of time. Please read the question again. – Bort – 2019-10-14T19:14:52.970
How would it work if a task runs at 6pm? For example, say I want it to sleep after 1 hour of inactivity. If I'm idle from 7pm to 7:30, then idle again at 9pm, does it sleep at 10pm? How do I make it stop trying after 8am the next day? – Bort – 2019-10-14T19:15:57.913
"only outside of working hours" is a specific time so that is what I was suggesting – John – 2019-10-14T19:16:17.647
"I want my PC to sleep after an hour of being idle, but ONLY outside of work hours (eg: 8am-5pm)." By that I mean that I want it to sleep after I'm idle for X minutes, but not during work hours. I'll edit the question in case it was confusing. – Bort – 2019-10-14T19:17:30.700
powercfg is a command line approach to run power options by command – John – 2019-10-14T19:18:45.343
You have made it a bit difficult by saying "don't suspend" in working hours, only after working hours. So the idea of task manager to identify working hours is about all there is – John – 2019-10-14T19:23:18.110
I think you mean "task scheduler"? – Bort – 2019-10-14T19:35:37.060
My error above. I meant Task Scheduler - not Manager. Sorry about the typo – John – 2019-10-14T19:36:27.473