Reputation: 99
I'd like to keep my Python script running, even when my computer is sleeping.
I am using a Mac.
My file is only on my computer, not online.
I know of UptimeRobot, but I don't know how to configure that to my local file.
I would prefer to keep my file local, because it makes a lot of things easier for my project.
Is there anything that can help me achieve this? (not hardware, thanks.)
If you need more information, please leave a comment!
Upvotes: 8
Views: 14921
Reputation: 1404
It's very simple.
open a terminal
type caffeinate
press Enter
Once you have done this, your Mac will stay awake for as long as you leave the Terminal running.
You can minimize or hide it, and your Mac will not go to sleep until you use the keyboard shortcut Ctrl+C to interrupt the command.
Upvotes: 21