<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><span style="background-color: rgba(255, 255, 255, 0);">Hello List,</span><div class=""><span style="background-color: rgba(255, 255, 255, 0);"><br class=""></span></div><div class=""><span style="background-color: rgba(255, 255, 255, 0);">I thought I’d share an applescript I wrote to automatically update the tor relay software and homebrew one minute after midnight every day.</span></div><div class=""><span style="background-color: rgba(255, 255, 255, 0);"><br class=""></span></div><div class=""><span style="background-color: rgba(255, 255, 255, 0);">Here is the source code (written using AppleScript editor)</span></div><div class=""><span style="background-color: rgba(255, 255, 255, 0);"><br class=""></span></div><div class=""><div class="" style="text-indent: 0px; margin: 0px 0px 0px 32.3px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);"><span class="" style="font-variant-ligatures: no-common-ligatures;">do shell script</span><span class="" style="font-variant-ligatures: no-common-ligatures;"> "$ which brew</span></span></div><div class="" style="text-indent: 0px; margin: 0px 0px 0px 32.3px; font-stretch: normal; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures; background-color: rgba(255, 255, 255, 0);">/usr/local/bin/brew update"</span></div><div class="" style="text-indent: 0px; margin: 0px 0px 0px 32.3px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);"><span class="" style="font-variant-ligatures: no-common-ligatures;">do shell script</span><span class="" style="font-variant-ligatures: no-common-ligatures;"> "$ which brew</span></span></div><div class="" style="text-indent: 0px; margin: 0px 0px 0px 32.3px; font-stretch: normal; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures; background-color: rgba(255, 255, 255, 0);">/usr/local/bin/brew upgrade tor"</span></div><div class="" style="text-indent: 0px; margin: 0px 0px 0px 32.3px; font-stretch: normal; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures; background-color: rgba(255, 255, 255, 0);">end</span></div></div><div class="" style="text-indent: 0px; margin: 0px 0px 0px 32.3px; font-stretch: normal; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures; background-color: rgba(255, 255, 255, 0);"><br class=""></span></div><div class="" style="text-indent: 0px; margin: 0px 0px 0px 32.3px; font-stretch: normal; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures; background-color: rgba(255, 255, 255, 0);">When it runs, it comes up with this error, saying tor is already up to date.</span></div><div class="" style="text-indent: 0px; margin: 0px 0px 0px 32.3px; font-stretch: normal; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures; background-color: rgba(255, 255, 255, 0);"><br class=""></span></div><div class="" style="text-indent: 0px; margin: 0px 0px 0px 32.3px; font-stretch: normal; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures; background-color: rgba(255, 255, 255, 0);"><br class=""></span></div><div class="" style="margin: 0px 0px 0px 32.3px; text-indent: -32.4px; font-stretch: normal; line-height: normal;"><div class="" style="text-indent: 0px; margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">sh: $: command not found</span></div><div class="" style="text-indent: 0px; margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">Error: tor 0.3.2.10 already installed (1)</span></div><div class="" style="text-indent: 0px; margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);"><br class=""></span></div><div class="" style="text-indent: 0px; margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">As this is the only error that appears, I’d take it that the script works</span></div><div class="" style="text-indent: 0px; margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);"><br class=""></span></div><div class="" style="text-indent: 0px; margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">It can be scheduled to run automatically <a href="x-apple-data-detectors://1" dir="ltr" x-apple-data-detectors="true" x-apple-data-detectors-type="calendar-event" x-apple-data-detectors-result="1" style="-webkit-text-decoration-color: rgba(0, 0, 0, 0.258824);">at midnight</a> every night via this method I found here:</span></div><div class="" style="text-indent: 0px; margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);"><br class=""></span></div><div class="" style="text-indent: 0px; margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);"><br class=""></span></div><div class="" style="text-indent: 0px; margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);"><br class=""></span></div><div class="" style="text-indent: 0px; margin: 0px; font-stretch: normal; line-height: normal;"><a href="https://apple.stackexchange.com/questions/24862/how-can-i-configure-my-computer-to-run-an-applescript-at-a-specific-time-caveat" class="" style="caret-color: rgb(0, 0, 0); background-color: rgba(255, 255, 255, 0);"><font color="#000000">https://apple.stackexchange.com/questions/24862/how-can-i-configure-my-computer-to-run-an-applescript-at-a-specific-time-caveat</font></a></div><div class="" style="text-indent: 0px; margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);"><br class=""></span></div><div class="" style="text-indent: 0px; margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">I am curious to know what you all think of this tactic if you will, please let me know as you can give it to others if you wish. Thank you.</span></div></div><br><div id="AppleMailSignature">Sent from my iPhone</div></body></html>