title: How do I run my bash script automatically on Mac
body: <p>I have some automated python files that run continuously at a certain time and I have added them to a bash script to run them at once. Individually the python files' automation work in testing, and the bash script worked on a unix server, some issues meant I had to start running the script from a local Mac book and now the automation has stopped working.</p>
  <p>The bash script still works as I see the results of the python files running when I start it, but the next day the automation hasn't kicked in.</p>
  <p>The code to run the python file is:</p>
  <p><code>nohup command &gt;/dev/null 2&gt;&amp;1 python3 &quot;path/to/script/pythonScript.py&quot; &amp;</code></p>
  <p>This code as I said worked on a unix server for running the pythons, letting me close the connection and the python code doing it's automation.</p>
  <p>I've tried adjusting the Mac's setting to not sleep, turned off needing to log in for wake up, automator attached to a daily calendar event, caffeinate -i and caffeinated -s and nothing has worked so far. My next attempt will be caffeinate -u to simulate user activity but after that I'm out of options.</p>
  <p>The likelihood soon is I'll start running this from a Raspberry Pi so I'm trying to find a solution by the time I have to move the script over.</p>