
Ask HN: What happens to a long-running script when my computer sleeps? - ezekg
I have a command line script running throughout the day monitoring plane ticket prices, and sometimes I forget it&#x27;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
When 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.

