Tuesday, November 07, 2006

How to schedule iSync on Mac ?

Now that I have a car with bluetooth handsfree, my mobile phone got its bluetooth always on (but NOT discoverable, for security reasons). Now it makes sense to schedule the iSync on my MacBook Pro to sync my Address Book and iCalendar with my phone automatically.

Initial thought was to use Mac's launchd as described at developer.apple.com but somehow I could not get it working :-(

So I got onto my unix comfort zone; so to use crond. There I have a script at ~/bin/iSync.scpt which contents as

tell application "iSync"
if not syncing then exit repeat
end repeat
end tell
return input
end run
and a cron job added using "crontab -e" as below

#m h dom mon dow command
25 16 * * 1-5 osascript ~/bin/iSync.scpt
and seems to work just fine.

No comments:

I am well fed with these !!