16

I'm calling a url with wget:

/usr/bin/wget --read-timeout=7200 https://site_url/s

Wget performs a GET request every 15 minutes in this case, despite the timeout being set, why does this happen?

The call should only be made once, how can I set wget to NOT Retry?
I know you can set t=n but 0 is infinite and 1 is 1 more than I want.

1 Answer 1

25

Read the man page again:

   -t number
   --tries=number
       Set number of tries to number. Specify 0 or inf for infinite
       retrying.  The default is to retry 20 times, with the exception
       of fatal errors like "connection refused" or "not found" (404),
       which are not retried.

Use -t to define the number of tries (attempts), not retries.

2
  • 2
    thanks, not sure why configuring 0 should equal infinite retries but thanks!
    – blue-sky
    Commented Sep 25, 2016 at 7:51
  • @blue-sky because it is not "retries", but "tries". So 0 would be anyway pointless (no execution at all). And in this case 0 is best for "infinite", that's how it was adopted.
    – Choinek
    Commented Jun 29, 2018 at 9:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .