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.
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.
The code to run the python file is:
nohup command >/dev/null 2>&1 python3 "path/to/script/pythonScript.py" &
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.
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.
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.