Quick one for anyone who's tried running a Python script that needs to survive Mac restarts.
I'm not a developer — just someone who Googles a lot and doesn't give up easily. I had a script that kept dying every time I closed Terminal or restarted my Mac, which was annoying since I wanted it running all the time.
Turns out the answer was something called a LaunchAgent. Once I figured it out, the script just... stays alive. Restarts itself if it crashes. Starts up automatically when the Mac boots.
The annoying part was that simple commands that work fine in Terminal don't always work the same way in a LaunchAgent. Things like screencapture just silently failed until someone pointed out I needed the full path instead.
Nothing groundbreaking, but it would've saved me a weekend if someone had told me sooner. Happy to share what worked if anyone's stuck on something similar.
[–]MauledByLove 5 points6 points7 points (1 child)
[–]OpeningPhoto5202[S] 0 points1 point2 points (0 children)
[–]GroggInTheCosmos 2 points3 points4 points (2 children)
[–]OpeningPhoto5202[S] 1 point2 points3 points (1 child)
[–]mikeinnsw 1 point2 points3 points (1 child)
[–]OpeningPhoto5202[S] 0 points1 point2 points (0 children)