Jan 3, 2008
Time Machine notifications using launchd
Here’s the requested .plist file, insert your username (or the path where you’ve put the Apple Script) and save it to /Library/LaunchAgents/com.apple.tm-notification.plist. Then do
launchctl load /Library/LaunchAgents/com.apple.tm-notification.plist
Here’s the .plist file:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.apple.tm-notification</string> <key>ProgramArguments</key> <array> <string>/usr/bin/osascript</string> <string>/Users/[user]/Public/tm.scpt</string> </array> <key>LowPriorityIO</key> <true/> <key>Nice</key> <integer>1</integer> <key>StartInterval</key> <integer>300</integer> </dict> </plist>
[...] * * * * /usr/bin/osascript /Users/[username]/Public/tm.scpt Edit: I did what a reader suggested, here is the .plist [...]
I hate to bother with such a beginner question, but which program do I use to save a plist file. Does the Script Editor allow this or do I just use textedit and change the extension? Thanks!
You can just use textedit and save it as .plist, it’s plain-text.
Once I run the launchctrl cmd above, is that it? I don’t have to run it again? Thanks!
Yeah, that’s it. launctl will load the .plist file and remember it for the next system start.
Ok, the script works when i run it and i get the pop up. however when used via launchd i get this in my system logs-
8/6/09 2:23:51 PM com.apple.tm-notification[42051] /Users/joe/Library/Scripts/tm.scpt:299:486: 8/6/09 2:23:51 PM com.apple.tm-notification[42051] execution error: An error of type -10810 has occurred. (-10810) 8/6/09 2:23:51 PM com.apple.launchd[1] (com.apple.tm-notification[42051]) Exited with exit code: 1
Any ideas?
Does any of this require execute permissions?
[...] Amazing four posts in 2008 and hardly any visitors to this site (except some people looking for Time Machine notifications with Growl – thanks for [...]