Launchd plist for Evernote2OmniFocus Applescript

A couple of readers on Thanh’s Asian Efficiency post on How to Automatically Transfer Evernote Notes to Omnifocus gave  examples of how to autorun the transfer script using cron.

Because cron has technically been deprecated by Apple, I figured out how to do it using launchd. Here’s how.

Open a text editor and past this code:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
 <key>Label</key>
 <string>com.your_name.en2omni</string>
 <key>OnDemand</key>
 <true/>
 <key>Program</key>
 <string>/insert_your_path_here/Evernote2Omnifocus.app/Contents/MacOS/applet</string>
 <key>StartInterval</key>
 <integer>900</integer>
</dict>
</plist>

Save it to your /Users/your_username/Library/LaunchAgents folder with the name local.en2omni.plist

In the string field for the Label key, replace "your_name" with your username.

In the string field for the Program key, replace insert_your_path_here with your path. Following Thanh’s example, it would be: "Users/thanh/Applescripts".

Right now, the update interval is set to 15 minutes. To change it, change the “900” in the integer field of the StartInterval key to the number of seconds you want OmniFocus to wait between updates.

A reboot should start the demon for you. If you don’t want to reboot, you can launch it from the command line by entering the following command:

launchctl load /Users/your_username/Library/LaunchAgents/local.en2omni.plist

Speak Your Mind

*