Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering if anyone knew a command line 'command' I could use in a cron to force the iTunes podcast updater to run overnight. I'm running 10.6

share|improve this question
+1 if you :s/cron/launchd/ – bmike May 17 '11 at 14:48
for anyone with errors using the solution see this article to fix them: – wajiw May 18 '11 at 15:20
up vote 3 down vote accepted

You can use the following AppleScript to ask iTunes to update all your podcast feeds:

tell application "iTunes"
end tell

This AppleScript can be performed from the command line through osascript:

osascript -e 'tell application "iTunes" to updateAllPodcasts'

You can use a range of tools to schedule your AppleScript to run each night. One option is to run the AppleScript as part of an iCal event: How to Use iCal to Run an AppleScript

Alternatively, you can create a launchd job ticket and place it in your ~/Library/LaunchAgents folder.

share|improve this answer
this is what I found online and have been getting an error which deals with 64 bit arch. I found a solution though: arch -i386 osascript -e 'tell application "iTunes" to updateAllPodcasts' Thanks for the help! Cron works just fine for me =) – wajiw May 18 '11 at 15:18
Is it possible to run this in "faceless mode", i.e. without having to open iTunes and instead perform the task in the background? – Henrik Nov 19 '12 at 14:30

I have a couple scripts wrapped in an automator that does all of the updating for me.

The first script makes sure that podcasts that haven't been listened to in a while aren't disabled. The second script then updates the podcasts.

"Update Expired Podcasts" for iTunes
written by Doug Adams

v1.0 aug 13, 2008
-- compatible with iTunes 7.7.1

v1.0 feb 15, 2007
-- initial release

Get more free AppleScripts and info on writing your own
at Doug's AppleScripts for iTunes

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

Get a copy of the GNU General Public License by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

or visit


tell application "iTunes"
    set podcast_playlist to some playlist whose special kind is Podcasts

    -- filter multiple names
    set each_podcast to {}
    set each_podcast to my get_discrete_list_of(get album of every track of podcast_playlist)

    -- update the podcasts
    if each_podcast is not {} then
        repeat with this_podcast in each_podcast
            set the_podcast to (some track of podcast_playlist whose album contains this_podcast)
            if (get class of the_podcast) is list then set the_podcast to item 1 of the_podcast
            updatePodcast the_podcast
        end repeat
    end if

end tell

to get_discrete_list_of(list1)
    script a
        property list1ref : list1
    end script

    set list2 to {}
    script b
        property list2ref : list2
    end script

    repeat with i from 1 to length of list1
        set this_item to item i of a's list1ref
        considering case
            if this_item is not "" and this_item is not in b's list2ref then set end of list2 to this_item
        end considering
    end repeat

    return b's list2ref

end get_discrete_list_of

Update podcasts:

tell application "iTunes" to updateAllPodcasts

No, I wasn't the originator of the scripts, but I forgot the original source URL.

share|improve this answer
thanks for the help but I figured out a solution =) – wajiw May 18 '11 at 15:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.