View Full Version : Backup on mount notification that daily backup not made

10-15-2011, 07:17 AM
I'm trying to think of an easy way to check whether a user has done their daily SD backup and if they haven't some how remind them.

As the backup only happens when the drive is connected it can happen anytime during the day. One idea I have is to write an AppleScript that looks at the SD logs and IF a backup was made any time during the current day the AppleScript would add an all-day event to an iCal calendar called SD Backup. This way the user can easily look in their calendar and see if they've forgotten to backup.

Any suggestions or better solutions to this?


10-15-2011, 08:31 AM
You could also probably use Growl to do some sort of notification to run an application, and use that application to "turn off" a reminder that you'd do otherwise. (I don't know if Growl has a "run this script" action, but it probably does.)

You could do a similar thing with an "On successful completion" shell script.

10-15-2011, 03:23 PM
I can't find an option to run a shell script in the "On successful completion" drop down. Did you mean "Run shell script after copy completes" on the advanced tab?

If you meant the latter this would have to be a shell script that runs an applescript to add the event to ical or can I specify an applescript directly?

10-15-2011, 07:25 PM
Yes, sorry. It would have to be a shell script that runs an applescript (with, say, osascript).

10-16-2011, 07:35 AM
No worries. Thanks for your help.

I created the following little script:

# Shell script creates an iCal event using AppleScript.
osascript <<EOF
tell application "iCal"
tell calendar "SD Backup"
set theDate to current date
set theTime to time string of theDate
make new event at end with properties {summary:"SD Daily", start date:theDate, allday event:true, description:"Completed at " & theTime}
end tell
end tell