This morning I started a very long running script with:
caffeinate python spam.py
and when I checked in on the computer several hours later, the computer was asleep! I moved the mouse and the script resumed executing normally. I've looked at man caffeinate and it looks like I should actually use:
caffeinate -s python spam.py
caffeinate -i python spam.py
What do I need to take into account when picking between -s and -i? What's the difference between preventing the system from sleeping altogether and idle sleeping when caffeinate is running for the duration of a utility's execution?