DirectNET

Data Center Management Solutions including UPS Systems, Data Center Cooling, KVM over IP & IP Power Strips, Server Racks and Server Rack accessories; KVM Switches and KVM Extenders; Rackmount Monitors and Rackmount Keyboards.


NAVIGATION
Home
Store
INSIDE MAC
Television Shows
Broadcast Shows
Daily News Shows
Special Shows
EVENTS
DAILY TIPS
Design
Mac OS X
Mac OS X UNIX
COMMUNITY
Forums
Surveys
NEWS
Current
Press
Archive
FEATURES
Editorial
Dr. Mac
Reviews
Reader Reports
RESOURCES
FAQ
Documentation
Learning Center
MAN pages
Glossary
Tutorials
Tips
Links

OUR PARTNERS

OSXFAQ Mac OS X Tip-of-the-Day   back to index

iCal - Launch a Command Periodically

By Adrian Mayo - Editor - OSXFAQ

This tip shows a neat way to launch a script or application at regular intervals by using iCal's alarm facility. For example, you might schedule a backup program to execute daily or weekly, perhaps during the night (so long as your Mac is left running). Here's how:

Create a new iCal event as usual (click and drag at the appropriate point on the main calendar window) and open the Info window by clicking the "i" button in the lower right corner.

Select "Run Script" from the alarm pop-up and two more lines appear from which you select the name of the script to run and a time at which to run the script:

Select "Other..." from the script pop-up and navigate to the desired script. Then select something appropriate, such as "On date", from the when pop-up. The selected script will now be launched just before the event is due.

The script must be an Apple Script. If you wish to run an application or a Unix script, simply write an AppleScript wrapper that launches the desired application or Unix script.

Here are two very simple AppleScript examples. The first launches a Unix shell script called 'test-script' in your home folder. The second launches a (fictitious) application called "Backup".

(I'm not an AppleScript expert, so excuse the simplistic examples.)

Enjoy! :- )

Tiger 10.4.3


Discuss this tip in the OSXFAQ Mac OS X Tip-of-the-Day Forum

E-mail your comments or suggestions to webmaster@osxfaq.com


Copyright © 2000-2009 Inside Mac Media, Inc. All rights reserved.
Apple assumes no responsibility with regard to the selection, performance, or use of the products or services. All understandings, agreements, or warranties, if any, take place directly between the vendors and prospective users.
Apple, the Apple logo, Mac, PowerMac G4, PowerMac G5, Xserve, Xserve RAID, PowerBook, iBook, Airport, AirPort Extreme, iMac, eMac, iLife, iMovie, iCal, iPhoto, iTunes, QuickTime, FireWire, iPod, iSight, AppleWorks, Macintosh, Jaguar, Panther, Mac OS, Mac OS X and Mac OS X Server are trademarks of Apple Computer, Inc.