3 ms·
Ask HN: What happens to a long-running script when my computer sleeps?
I have a command line script running throughout the day monitoring plane ticket prices, and sometimes I forget it's running and put my Mac to sleep at the end of the day. When I wake it up, the script continues on as if nothing happened, but sometimes time stamps are a little funky. What actually happens when I put my Mac to sleep? Does the OS pause all running processes? What part of the OS handles unpausing the processes when awoken without corrupting their state?
- davelnewton 10y agoWhen your machine sleeps, it sleeps. Only a few processes remain running, like wake-on-LAN or BT etc. Normal task scheduling handles waking things up.