With all the apps we run now on our Mac's and agents that are doing stuff on our behalf, I'm mindful how long my computer can effectively run before the hardware starts to degrade.It's not uncommon for me to have all my apps running for weeks on end and I just put the Mac to sleep at night. But I also don't want it to sleep during the day as I'll often have agents doing work on my behalf.But lately, I've found that overnight my Mac has not been sleeping and something is keeping it awake. WhatApp for desktop, you're the biggest offender. But I've found a few things like a browser, or even my own app has done something to keep the Mac from sleeping.With Claude I managed to diagnose what the offending apps are. But it make me think.How do I prevent my mac from sleeping during the day, but idle sleep at night?So with my trusty agent, we made the following script to run a background daemon to do it. It works by switching the AC idle-sleep timer on a schedule. So at 11pm at night, my Mac…
No comments yet. Log in to reply on the Fediverse. Comments will appear here.