Apple’s Automator is the Gift That Keeps on Giving
Automator is a built in feature of Apple OS X, starting with version 10.4. I’ve used it in a variety of situations and the more I use it, the more I find I really enjoy it.
In a nutshell, Automator is a graphical way to script/automate many of the features of your Apple computer. Want to resize and rename a large number of pictures? Easily done with Automator, but it’s also possible to apply color correction and other effects en mass as well. Want to copy all your email to your iPod in the morning so that you can read it on the subway to work in the morning? Again, easy. Here’s what an Automator workflow looks like:
This is cool and, incidentally, a feature that Microsoft hasn’t even tried to emulate in Vista.
Automator workflows can be run through the graphical interface but I just realized that they can also be run from the command line. The workflow icon that is saved to your Desktop (or wherever) looks like a file but is in reality a directory. Hidden under the path example.workflow/Content/ is a file called document.wflow. The document.wflow file can be invoked by Automator from the command line as shown below:
What this means is that the general Automator coolness can further extended by scheduling Automator to run workflows without any user intervention. The scheduling service we use to do this is called “cron”, a UNIX utility that comes pre-installed on Mac by virtue of the BSD core of OS X. There are a variety of circumstances where scheduling workflows could be useful. Using the email-to-ipod-copying example from above, you can schedule your Automator workflow to copy emails to your iPod 10 minutes before you usually walk out the door in the morning so that all you need to do is grab and go. In order to set up a scheduled Automator workflow, do the following:
- Set up a workflow and save it. For this example we’ll assume that the workflow is named “example” and it is being saved to the Desktop. Your Automator workflow will look like this:

but remember that it’s in fact a directory and not a file.
- Create a text file that will be hold the schedule information we will feed to “cron”. We’re going to be using the terminal in just a few minutes to start the cron job, so might as well get warmed up. Change directories to Desktop (’cd Desktop/’) and run the “nano” editor by using the following command:
Assuming we want our workflow to run once a day at 7:30 in the morning, the file would look like this:
- Next we load the job into our “crontab”. This is illustrated below, along with how to check to make sure everything made it in alright:
So that’s it. There’s a lot more that can be done here - for example you could set up the cron job to run only on weekdays by modifying the cron job slightly, but that’s probably out of the scope of this post.
What do you all think? Have you got interesting or inventive uses of Automator that you’d like to share?






Andy Middleditch wrote:
Good article. I used this info to schedule my Automator back-ups. It’s amazing what you can find inside a Packaged file…
Posted on 24-Mar-07 at 9:42 am | Permalink
Antonio Vivaldi wrote:
Works great ***EXCEPT*** that every time your wflow script fires off, Automator steals the keyboard focus. This is really bad and really annoying if you have a job that runs frequently (like every minute). Completely frustrating to anyone using the Mac.
Posted on 20-Mar-08 at 6:31 am | Permalink
Mr Interested wrote:
@Antonio
Granted, this technique isn’t perfect. Using Automator is an attractive proposition because it’s accessible to the less technical, but it entails certain drawbacks. Perhaps your needs would be better met with something like RubyOSA or some similar mechanism, tied to Cron?
http://maczealots.com/tutorials/rubyosa/
http://macdevelopertips.com/ruby/ruby-an-applescript-alternative-part-1.html
Posted on 21-Mar-08 at 10:38 am | Permalink