A little-known use for the alarm feature.
I thought I’d written about this somewhere here, but I guess I didn’t. So here it is: a very easy way to trigger scripts and Automator actions on your Mac.
- Open iCal.
- Create a new event for the date and time you want the script or action to run.
- If the action should be repeated — for example, run every day at the same time — use the Repeat options to set up the frequency.
- Choose Open file from the Alarm pop-up menu.
- By default, iCal appears in a menu beneath it. Choose Other from that menu and use the dialog that appears to select the script or action you want to run. When you click the Select button, its name appears under Open File.
- Set the time option to read 0 minutes before.
- Save your settings.
From that point forward, the script or action will run on schedule with no additional effort on your part.
This works in the current version of iCal (part of Leopard) as well as the version that came with Tiger. I don’t know about earlier versions. The screenshot here is from Leopard.
A few bonus tips:
- If you don’t want these events cluttering up your calendar views, put them in their own calendar and turn off the check box for it in the Calendars list. The events will continue to work, but you won’t have to look at them.
- Be sure that neither Turn off alarms option is enabled in iCal’s Advanced preferences. If you turn off alarms, this alarm obviously won’t work. If alarms are turned off when iCal is not running, you’ll have to keep iCal running all the time for this alarm to work.
- iCal 3 (which is part of Leopard) enables you to set multiple alarms for a single event. use this to run multiple scripts or to run the same script multiple times in a day.
Mac OS X 10.5 Leopard: Visual QuickStart Guide includes more information about related topics:
- Adding iCal Events, page 254
- Setting Event Details (including alarms), pages 255-257
- Adding Calendars, page 261
- Using AppleScript and Automator, pages 613-636