11/23/09
7:46 am

MacMost Now 322: Schedule Automator Tasks Using iCal

You can create tasks in Automator and then have iCal run them at a specific time in the future, or even as a recurring event. This example shows you how to have thumbnails of new photos automatically sent to an email address every week.

Video Transcript (Click to Expand)
Hi this is Gary with MacMost Now. On today's episode let's learn how to use iCal to schedule Automator events.
So Automator will allow you to create actions that your computer can perform automatically but did you know you can use iCal to schedule these events to run on a regular schedule or at some point in the future.
So let's setup a somewhat useful Automator script that someone may want to run every week.
We'll start with finding iPhoto items and let's say that we want to find the ones that are new this week.
So we can set it to "date photographed" is "this week" or we can set it to "is in the last" 7 days, since I don't have that many photos on this particular computer I'm going to set it to the last say 12 months. I can run it and see what the results are here and you can see I've gotten a bunch of photos in the results, so that's fine.
Now I want to go and go to the next step and create thumbnails from these.
Now that I've created thumbnails from these I can set the size, I'm going to create a new mail message from those thumbnails.
I'm going to have it sent to me and I'm going to give it the subject "This Week's Photos."
I can add something to the message if I want, but instead I'm just going to "send outgoing messages."
When I run this, we'll run iPhoto, create the thumbnails, create a new message in mail and send it.
Now if I check my work here, I can get mail and see that there it is. There's the message just sent to me.
So you can use this to say have a photographer send the current week's thumbnails to an assistant every week automatically, if we can just get it to run automatically.
So in Automator I want to save this workflow out as either a workflow or an application.
I'll choose an application this time call it "SendPhotos.app" and for the purpose of this demonstration I'll save it to the desktop, now I have something that I can hook into iCal. In iCal I'll decide to say run this Friday, I'll click on a future Friday night, give it a name, and then I'll have it repeat every week.
I'll set a time at 9pm, then I'll look at the alarms and I will say "Open file." I'll change the file to "other" and select "SendPhotos.app" at the desktop and then I still have to go back here and select "SendPhotos.app' like that so now it says "Open file SendPhotos.app" 15 minutes before I can change it to on date to have it due exactly at that time.
I can set another alarm, like a little message or something that it triggered, click 'Done'.
So now I look in iCal here and I see it's going to send photos, so we're going to run that script every Friday at 9 o'clock and it should send that email automatically now.
So of course the mac has to be on, it has to have access to all these applications, another thing it has is to get in the way.
This is useful if it's a production mac that is always running and this won't be a problem,
You don't have to schedule to run every week, you can schedule it for only a specific time in the future or have a script standing by and every one in a while you can create a new schedule say to send you some more data only when you're on vacation that kind of thing.
i hope you found this useful till next time, this is Gary Rosenzweig with MacMost Now.

Comments: 20 Responses to “MacMost Now 322: Schedule Automator Tasks Using iCal”

    Randallg
    11/28/09 @ 5:01 am

    Thanks for the ep Gary. Does iCal need to be running for this to work and does it work if your Mac is in sleep mode? One thing I’d like to do automatically or ideally Apple incorporate into the next itunes is to schedule the download of podcasts each day. I have an offpeak internet quota allowance so I want to download all podcasts during this time in the early morning each day. I know you can tell iTunes to check for podcasts each day but it keeps the update time to match the last time you manually initiated a download check of available podcasts so doing this during my ‘peak’ period will reset the downloads setting to this time the next day.

      11/28/09 @ 9:44 am

      iCal does not need to be running. iCal alarms work anyway. Not 100% sure about them running when the computer is asleep, though. Easy to test, though. As for checking for podcasts, I suppose you could record an Automator set of actions where you run iTunes, go to podcasts and click “refresh” — it should work. But easy enough to try it and see.

    Nathan
    3/18/11 @ 9:55 am

    I have an automation set to run at 12:15am every morning. It copies my preconfigured XML file for my Podcast to my FTP server, essentially updating my podcast at 12:15am every day.

    -I have set my computer to never sleep
    -I have scheduled a wake up at 12:01 am
    -I have my screensaver set to require a password after 5 minutes.

    When I am in front of my computer and activate the screensaver, the automation runs, but for some reason, in the middle of the night, the automations never run. Anyone have any ideas what settings I could look at?

      3/18/11 @ 10:06 am

      Hard to say what might be going on. How about turning off the screensaver altogether and just have the display sleep? For this sort of thing you just have to keep experimenting to figure out what might be getting in the way.

    Matt
    6/20/11 @ 7:29 am

    For scheduling Automator using iCal, if you set the alarm to “on date”, the alarm will only be triggered on that date. “On date” won’t set the alarm again for the next day. If you want the alarm to recur, i.e., the file to run every day, you need to set the alarm to “minutes before” and select “0” or whatever time you’d like.

    Kim
    8/12/11 @ 11:11 am

    I was trying to write a workflows similar to the one you used as an example. However, my workflows gets an error right before sending the email with the photo thumbnails. The error message says that the email address doesn’t appear to be valid and asks for validation. Then it does not send the email message.
    I’ve tried to edit my contact record for that email address so that it didn’t include a name, but simply the email address. I can’t figure out what the hang-up is. I would greatly appreciate any feedback. Thanks.

      8/12/11 @ 12:09 pm

      Not sure what it is you are seeing. is the email address a standard one, like something@something.something? Why would the contact record come into play — is it asking for a contact? What is the error message, exactly?

        Kim
        8/12/11 @ 6:12 pm

        Hi,
        Yes, the email address is standard. The error message is: “” Warning: does not appear to be a valid email address. Verify the address and try again.”

        I notice that when my email is generated and about to be sent, as is what happens with any email I send, the person’s full name pops up in place of the spelled-out email address. I at first wondered if Automator needed to see an email address, and not someone’s personal name. I am stumped.

        Later, I went to a Mac forum on Lion and it seems that other people are having this problem as well. They are all Lion users.

        I really like your video. Its very helpful. I am hoping I can make a successful workflow just like it. Mine seems to work until the email needs to be sent, the last step. Then this error pops up. Thanks for your help.

          8/12/11 @ 6:40 pm

          Yep. Seems to be a bug in Lion’s Automator. See: https://discussions.apple.com/message/15915977

            Kim
            8/13/11 @ 12:08 pm

            I finally did get my Automator workflow to work. It was being hung up on the last step: send outgoing email. I found out that I have to fill in all of the fields: To, cc, bc for it to send.

            Now I’m having some trouble getting my automator app to execute its task by scheduling it as an event using Calendar.
            Are you aware of any changes in the process that you demonstrate in this video caused by Lion? Thanks again for doing such a nice instructional video on this process.

    Kim
    8/14/11 @ 10:55 am

    I did figure this out. I used the calendar plug-in function in automator.
    Thanks again1

      Jared
      9/12/11 @ 7:30 pm

      Gary/Kim,

      When you use the calendar plug-in function in automator, any idea of where you go to edit it later? It doesn’t seem to be saved anywhere other than an event in ica (I did a spotlight search and didn’t come up with anything). Thanks!

        9/12/11 @ 7:54 pm

        Have you tried doing File, Open, Recent or something similar in Automator? Or searching for it in spotlight. I can’t remember where, exactly, they are. Maybe the user/library folder somewhere.

    Marco
    1/31/12 @ 4:35 pm

    Hello Gary

    Thanks for your nice video, but I also can’t find the new created file when using an iCal reminder.
    I’m also not able to choose any “other” app when I try to make an event in iCal by selecting Reminder>Open file>Other

    Can you please help me out?

    Thanks a lot!

    Marco

      1/31/12 @ 4:38 pm

      I don’t know what you are asking. Creating a Reminder in iCal doesn’t create a file. It just creates a reminder in the list. There is no menu named “Reminder.”

      Morgan
      2/13/12 @ 2:05 pm

      I found the iCal file at ~/Library/Workflows/Applications/iCal

    Ian
    2/15/12 @ 9:33 am

    Gary is there a way to silence the alert on my mac and iOS devices so when this runs I don’t need to clear alerts?

      2/15/12 @ 9:50 am

      Not sure what you mean. Running an automator script shouldn’t trigger sounds.

      Ian
      2/15/12 @ 10:01 am

      Nevermind I figured out a way to run this on my mac using the iCal Alarm plugin.

    ShannonGB
    10/20/12 @ 9:12 am

    I set up a task using automator to visit a bookmarked website and I’m trying to schedule it in iCal to visit it a certain time every day. When I am setting it up in iCal, when I go to select the file to choose for the “open file” portion of the set-up it is grayed out, not letting me select the file. I tried saving the action both ways, as an application and as a workflow. Both files are not selectable. Help?

Comments Closed.