Choose how many times a failed run is tried again, and how long to wait in between.

An attempt fails when your target answers with anything other than a 2xx status, or does not answer in time. The scheduler then waits and tries again, until an attempt succeeds or the retry policy runs out.

The retry policy

Set it in a job’s retry. Every field is optional, and a field you leave out takes its default.

countinteger

How many times to try again after the first attempt, 0 to 5. The default is 0, so a failed run is not retried unless you set it.

minBackoffSecondsinteger

The first wait, 1 to 3,600 seconds. The default is 5.

maxBackoffSecondsinteger

The longest wait, 1 to 3,600 seconds, and at least minBackoffSeconds. The default is 3,600.

maxDoublingsinteger

How many times the wait doubles before it grows by the same step each time, 0 to 16. The default is 5.

maxDurationSecondsinteger

Stop retrying once the run is this old, 0 to 86,400 seconds. The default, 0, means no limit.

How the wait grows

The wait starts at the minimum, doubles maxDoublings times, then grows by the same step each time, and never goes past the maximum.

With a minimum of 10 seconds, a maximum of 300, and 3 doublings, the waits are:

10, 20, 40, 80, 160, 240, 300, 300

Why attempts fail

Each failed attempt records a class, so you can tell a slow target from an unreachable one.

ClassWhat happened
httpYour target answered with a status that is not 2xx
redirectYour target answered with a redirect, which is not followed
timeoutYour target did not answer within the attempt deadline
dnsThe target’s name could not be resolved
connectThe connection could not be made
tlsThe secure connection failed, such as an expired certificate
blockedThe address is on a private network, and is never called
lostThe call was interrupted on our side, and is tried again
requestThe request could not be sent

Last updated