Retry jobs
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.
countintegerHow 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.
minBackoffSecondsintegerThe first wait, 1 to 3,600 seconds. The default is 5.
maxBackoffSecondsintegerThe longest wait, 1 to 3,600 seconds, and at least
minBackoffSeconds. The default is 3,600.maxDoublingsintegerHow many times the wait doubles before it grows by the same step each time, 0 to 16. The default is 5.
maxDurationSecondsintegerStop 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, 300Why attempts fail
Each failed attempt records a class, so you can tell a slow target from an unreachable one.
| Class | What happened |
|---|---|
http | Your target answered with a status that is not 2xx |
redirect | Your target answered with a redirect, which is not followed |
timeout | Your target did not answer within the attempt deadline |
dns | The target’s name could not be resolved |
connect | The connection could not be made |
tls | The secure connection failed, such as an expired certificate |
blocked | The address is on a private network, and is never called |
lost | The call was interrupted on our side, and is tried again |
request | The request could not be sent |
Last updated