Hello list,
So for a while I have been struggling to find a way to automatically update the tor relay software on macOS High Sierra. What I am currently doing is running a batch file that runs the command “brew upgrade tor” continuously. However, I am attempting to find a way to do this automatically on macos High Sierra where the process doesn’t have to be running every second.
Here’s the unfortunate thing, on the newest macos operating systems, it appears there is no possible way to run terminal commands automatically, as crontab has been disabled / removed from newer mac operating systems (I discussed this with Apple technical support) and applications to run scripts automatically are incompatible with newer macos.
Any thoughts on this would be appreciated, thank you.
Hi,
On 10 Jul 2018, at 09:21, Keifer Bly keifer.bly@gmail.com wrote:
So for a while I have been struggling to find a way to automatically update the tor relay software on macOS High Sierra. What I am currently doing is running a batch file that runs the command “brew upgrade tor” continuously. However, I am attempting to find a way to do this automatically on macos High Sierra where the process doesn’t have to be running every second.
We do stable Tor releases at most every few weeks, so once a day should be fine.
Here’s the unfortunate thing, on the newest macos operating systems, it appears there is no possible way to run terminal commands automatically, as crontab has been disabled / removed from newer mac operating systems (I discussed this with Apple technical support) and applications to run scripts automatically are incompatible with newer macos.
On macOS High Sierra, cron is deprecated, but not disabled: https://en.wikipedia.org/wiki/Deprecation
So I’m not surprised that Apple technical support told you not to use it.
Any thoughts on this would be appreciated, thank you.
You might find this stack overflow answer helpful: https://stackoverflow.com/questions/32781884/is-crontab-broken-on-osx-el-cap...
Here’s how I executed a command via cron on macOS High Sierra: ($ means: In a non-root user terminal, run the command after the $)
$ crontab -e Type: * * * * * /usr/bin/osascript -e 'tell app "Finder" to display dialog "I am cron"' Exit your editor. Wait a minute, then check the Finder for a dialog.
Next time you have a general sysadmin question, try searching online for the answer.
T
On Jul 9, 2018, at 19:21, Keifer Bly keifer.bly@gmail.com wrote:
I am attempting to find a way to do this automatically on macos High Sierra where the process doesn’t have to be running every second.
The preferred way to do this is with launchd. Basically, you create a special .plist file that defines the paramaters for the job, put it in /Library/LaunchDaemons, and use the launchctl command to activate it.
Here's more info:
https://www.splinter.com.au/using-launchd-to-run-a-script-every-5-mins-on/
--Ron
tor-relays@lists.torproject.org