home > anthracite docs > examples > iCal Scheduling
Scheduling Anthracite with Apple's iCal

Scheduling your Anthracite Documents to be automatically run via iCal is easy!
First, you must have a completed Anthracite document ready, in this example case, we're reading the latest news from Apple.
Next, we have to create an AppleScript to control Anthracite.
Start with the text file "AppleScript Run Anthracite.scpt" on the Anthracite distribution disk image in the "Goodies > Samples > Examples" folder.
You may wish to modify the chosenFile variable to point to a specific document instead of prompting with a dialog, as we have done here:

After testing it to make sure it works, this script should be saved as a "Compiled Script" in a common location.
The next step is to switch to iCal, and create a new event.

Name it something you'll understand and recognize, and set the "from" (start) time of the new event to the time you want the Anthracite document to be run.
Next, set an "alarm" for the event, using "Open File..." to specify the Compiled Script we saved above, and "0" (zero) minutes before the event.
When done, you'll have an item on your calendar representing when the Anthracite Document script will be run!

Which also means that if you want your document to run every day (or week, or month...) at a particular time, all you have to do is set the "repeat" field to the appropriate settings.

For finer-grain control of scheduling (such as every fifteen minutes, hourly, etc.), you may need to use UNIX Cron job scheduling, see the Anthracite Cron FAQ.
[ top ]
last modified: 7/20/2004
Copyright © 2004 All Rights Reserved, Metafy LLC. iCal is a trademark of Apple Computer.