goguma

Writing

What actually happens when a Mac sleeps through the work it was supposed to do, why the usual advice does not fix it, and how each of the tools in this area really behaves.

Why your Mac's cron jobs don't run while it's asleepcron skips a job whose time passed while the Mac was asleep — no error, no retry, no record. launchd behaves differently. Here is exactly what happens, and what to do about it.How to wake a Mac for a scheduled job with pmsetThe complete method — computing the wake time, arming it, holding sleep off until the job finishes, and re-arming for next time — plus the four things that go wrong.How to find which of your scheduled jobs your Mac has been missingcron keeps no record of a job it skipped, so you have to reconstruct it — replay each schedule against the machine's own sleep history. Here is how, by hand.launchd vs cron on macOS — which one survives sleeplaunchd re-fires a missed calendar job on wake; cron skips it silently. Which one you are using decides whether a sleeping Mac is a problem or a non-event.caffeinate vs pmset vs Amphetamine — what each one actually doesThree tools people reach for interchangeably that behave completely differently with the lid closed, on battery, and when the thing holding the assertion dies.Why caffeinate doesn't work when you close the lidcaffeinate asserts against idle sleep. Closing the lid is a different sleep path entirely, which is why your job dies the moment the MacBook shuts — and what actually holds it.Amphetamine alternatives for macOS, compared honestlyEvery keep-awake app for the Mac, what each actually does with the lid closed, and the question that separates them — what happens when you forget to turn it off.You cannot tell whether an AI coding agent is working by watching itMeasured over ten seconds, the idle Claude Code session used more CPU than the one actively working. Here is the data, and why every process-watching approach to agent sleep prevention is built on sand.Is it safe to keep a MacBook awake with the lid closed in a bag?The two real risks are thermal and battery, and the reason lid-closed is the dangerous case is that you cannot see anything is wrong. What a safety cutoff has to check, and the sensor trap that makes a naive one useless.How to keep Claude Code or Codex running when you close the MacBook lidWhy the agent dies the moment the lid shuts, the three ways to fix it ranked by how badly each fails, and the hook configuration for all four major harnesses.