Augmenting an automatic backup for OS X
I maintain a local wiki full of important information. A calendar script is kicked off every day at a certain time which backs it up to an external drive. When it’s done, it emails me to let me know if was successful. It works really well. However, sometimes I would like to kick that backup myself, whenever I’d like to.
Using Automator (which is the source for the calendar triggered backup script), a tiny bit of AppleScript, and an email rule in Mail.app, I can easily email an account with a rule associated with it – and when it’s triggered, kicks off the Automator Workflow. It’s awesome. Awe.Some.
The mail script (from the rule):
tell application "System Events" tell process "Finder" keystroke space end tell end tell delay 1 tell application "System Events" keystroke "<yourpassword>" & return end tell do shell script "automator /Users/<pathtoworkflow>" delay 5 tell application "System Events" to start current screen saver