just in case you're interested.  I wrote a ruby script to start itunes
download the podcasts and close.  I got my inspiration (read code
plagiarism) from a couple of different sites doing it in a couple
different languages.



require 'win32ole'

TIMEOUT = 120 #run for a total of 120 minutes before forcing a shutdown.
BUSYPATH = ENV['homedrive'] + ENV['homepath'] + '\\My Documents\\My
Music\\iTunes\\iTunes Music\\Downloads\\Podcasts'

iTunes = WIN32OLE.new('iTunes.Application')

begin
        puts 'iTunes Started'
        timeout = Time.now + (TIMEOUT * 60)
        
        puts 'forcing update of podcast feeds'
        iTunes.UpdatePodcastFeeds
        
        sleep(30)
        
        while Time.now < timeout && File.exists?(BUSYPATH)
                puts 'still downloading stuff'
                sleep(60)
        end
        
        puts 'forcing a shutdown do to timeout' unless Time.now < timeout
                
        puts 'quitting iTunes'
        sleep(30)
        
        iTunes.quit
        iTunes = nil
        
end unless iTunes.nil?


On 5/29/07, Marlon Moyer <[EMAIL PROTECTED]> wrote:
> I guess iTunes doesn't like to listen to the scheduler.  iTunes will
> open on command, but it won't close.  Damnable software!
>
> On 5/29/07, Nick McClure <[EMAIL PROTECTED]> wrote:
> > In the task scheduler you can tell it to end the task after a certain amount
> > of time if it is still running
> >
> > > -----Original Message-----
> > > From: Zaphod Beeblebrox [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, May 29, 2007 9:19 AM
> > > To: CF-Community
> > > Subject: Scheduling iTunes
> > >
> > > I use iTunes to do all of my music management and podcast downloading.
> > >  It irritates me that I cannot schedule iTunes to download only in off
> > > peak times since my internet connection basically sucks.  I'd like to
> > > set up something where I can start iTunes around 2am and have it run
> > > for a couple of hours downloading the latest podcasts and then
> > > automatically close.  I figure I can use the built in windows
> > > scheduler to do the start up, but I don't think it'll be useful for
> > > the closing.  Any suggestions?
> > >
> > >
> >
> > 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Community/message.cfm/messageid:235749
Subscription: http://www.houseoffusion.com/groups/CF-Community/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5

Reply via email to