Stop Being Carbon

Icon

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>

Category: Technology

Tagged:

8 Responses

  1. [...] * * * * /usr/bin/osascript /Users/[username]/Public/tm.scpt Edit: I did what a reader suggested, here is the .plist [...]

  2. Bill says:

    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!

  3. Christoph says:

    You can just use textedit and save it as .plist, it’s plain-text.

  4. Chris Carpenter says:

    Once I run the launchctrl cmd above, is that it? I don’t have to run it again? Thanks!

  5. Christoph says:

    Yeah, that’s it. launctl will load the .plist file and remember it for the next system start.

  6. Joe says:

    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?

  7. Joe says:

    Does any of this require execute permissions?

  8. [...] Amazing four posts in 2008 and hardly any visitors to this site (except some people looking for Time Machine notifications with Growl – thanks for [...]

Leave a Reply