Camera Icon

Got an event that needs shooting?  I've covered multiple events for marathon-photos.com and can capture the scenes & emotions that make your event unique.

Some samples of my own work are at Digital Formula on Flickr.

Wand Icon

Do you or your business need a website but you're unsure where to start?  Get in touch now and we'll get it sorted.

I focus on usable functionality & can setup smaller sites using Wordpress within hours of the order being placed.  Magic!

Globe Icon

So, you've already got a website but need help managing it?  I can help you.

Don't worry about knowing every single detail.  I'll find out the most important stuff and work with you to reach your goal, not someone else's.

said on twitter: LOL spammers really do bank on the ignorance of their targets huh? A file with a .jpg.exe extension ... really? http://t.co/0TgobjQc

 
Short URL
Warning: This article is older than 180 days and may contain inaccurate information.  Please use the information below at your own risk.

Scheduling AppleScript using iCal

A few days ago I published an article that made my AppleScript backup ‘system’ available for download.  One of the things missing from that article was how to schedule the script so it runs backups automatically - I'm going to address that today.

There are a ton of ways to accomplish the scheduling a script to run.  If you're hardcore you can use Cron (I won't cover that here), you can purchase some scheduling software for OS X or you can do what I do - use iCal.

But iCal is a calendar ... isn't it?

Yes, it is.  However, because it's a calendar, you can add events and set reminders for them.  See where I’m going with this?  Correct - you can run an AppleScript as part of an iCal event’s alarm.  If you read the article about my AppleScript backups, you’ll remember that I said that the idea was to do things with built-in apps, if possible.  Every OS X installation includes iCal by default so it just makes sense to use it here.

Won’t my calendar get messy?

iCal allows you to setup separate calendars for different types of events so no, it won’t get messy if you don’t want it to.  For example, I have a calendar called ‘Backups’ and it holds ... wait for it ... backups.  :-)  My backup script runs each day at 8:00 p.m. without me having to do anything manually.

Here’s an example of what one of my backup events looks like.  Note that the event is set to happen 15 minutes after the actual backup starts, with the reminder event triggering 15 minutes before that, i.e. at the actual time the backup is to start.

iCal event to run the backup script
iCal event to run the backup script

It really is that simple.  You don’t need anything other than what comes with your OS X installation to do any of this either - that makes it completely free.

If you end up using any of this, I’d love to hear about it.  Thanks for reading!

» Tags: mac, osx, ical, applescript, script
DigitalFormula is an experiment in HTML5 and CSS3 design by Chris Rasmussen, an amateur/casual designer based in Melbourne, Australia. -37.813611 144.963056