I want to leave rsync working over wifi for hours turned on AC power. But when I do so the Mac breaks the connection after some time.
On Energy Settings pane it's configured to "Computer Never Sleep", "Put hard disk to sleep when possible" and "Wake for network access".
Plus it'd be good if the mac actually goes to sleep once the task is done.
I realize a very similar question have been asked before and that there is pmset and insomniaX, but I don't want the machine to be sleepless. And I don't want to keep installing more and more extensions, nor have to tweak through pmset every time.
I want it to natively behave as expected – stay awake while I leave it running a task, and then go to sleep "when possible". This time is due to rsync, but next time could be something else.
Am I expecting too much as usual? Can I fix it? Is it even broken?
Best Answer
Caffeinate
For example:
From the man page:
It can also be used for situations like "don't let the display sleep while I'm watching this movie":
... or "stay awake for the next 10,000 seconds":
See
man caffeinate
for details.