bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fwd: Re: [Bug-wget] can you set wget to retry after a 404 not found err


From: Micah Cowan
Subject: [Fwd: Re: [Bug-wget] can you set wget to retry after a 404 not found error]
Date: Thu, 06 Nov 2008 22:46:03 -0800
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

(Ben meant to send this to the list as well)

-------- Original Message --------
Subject: Re: [Bug-wget] can you set wget to retry after a 404 not found
error
Date: Thu, 6 Nov 2008 20:06:21 -0800 (PST)
From: Ben Smith <address@hidden>
To: Micah Cowan <address@hidden>
References: <address@hidden>
<address@hidden>

Thanks for the info.  The error level idea works great.  Here's the
batch file in case any other Windows users are interested and searching
for a solution.

****************************
@for /F "tokens=1 delims=- " %%A in ('Date /t') do set DD=%%A
@for /F "tokens=2 delims=- " %%B in ('Date /t') do set MM=%%B
@for /F "tokens=3 delims=- " %%C in ('Date /t') do set YY=%%C
set ST=1
:wget
ping -n %ST% 127.0.0.1 > NUL 2>&1
set ST=300
wget http://query-origin.andohs.net/8000A6/content-root3.andomedia.com

/origin/mp3/espnradio/insider/mikeandmike/mikeandmike_%MM%%DD%20%YY%.mp3
if NOT ERRORLEVEL 1 (sndrec32 /play /close "C:\Windows\Media\Notify.wav")
     ELSE goto :wget
*******************************
notes: indents indicate continuation of a line, ST=300 provides a 300
second delay by pinging the local host after the first failure and loop
back to :wget


----- Original Message ----
> From: Micah Cowan <address@hidden>
> To: Ben Smith <address@hidden>
> Cc: address@hidden
> Sent: Thursday, November 6, 2008 3:18:29 PM
> Subject: Re: [Bug-wget] can you set wget to retry after a 404 not found error
> 
> Ben Smith wrote:
>> I'm trying to set up a batch file under Windows XP that will try to
>> download a daily podcast that gets posted at varying times everyday.
>> After a 404 error, wget simply aborts rather than retrying.  I looked
>> through the documentation and couldn't find a way to change this
>> behavior.  Is it possible to get wget to retry after a period of time
>> following a 404 error? Thanks
> 
> Nope, and that's not really something I'm interested in supporting in
> Wget; retrying after a "period" is not really within Wget's scope; it'd
> be better handled by an outside script.
> 
> My argument is weakened significantly by Wget's poor management of exit
> statuses; however, if you're not using the -r option, it should give a
> non-zero exit status, so you can know to retry in another 20 minutes.
> 
        
-- 
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer.
GNU Maintainer: wget, screen, teseq
http://micah.cowan.name/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]