Skip to content

Retry Policy

You can configure the retry behavior using the retryPolicy option.

General Options

OptionTypeDefaultDescription
typestringRequired'fixed', 'linear', 'exponential', 'series', or 'cron'
maxAttemptsnumber5*Maximum total attempts (use -1 for unlimited).
maxDurationstring | numberundefinedStop retrying if elapsed time since the first failure in the current sequence exceeds this value.
resetRetriesOnDataChangebooleantrueReset attempt count if the source document changes.

* If maxDuration is specified, maxAttempts defaults to unlimited.

Policy Specific Settings

PolicyPropertyDefaultDescription
fixedinterval-Delay between retries (e.g., '10s').
linearinterval-Base delay multiplied by attempt number.
exponentialmin'10s'Initial delay for the first retry.
exponentialmax'1d'Maximum delay cap for backoff.
exponentialfactor2Multiplication factor per attempt.
seriesintervals-Array of fixed delays (e.g., ['1m', '5m', '15m']).
cronexpression-Standard cron string for scheduling retries.

Examples

typescript
// 1. Give up after 24 hours (infinite attempts within that window)
retryPolicy: {
    maxDuration: '24h',
    type: 'exponential',
    min: '10s',
    max: '1h'
}

// 2. Exact retry ladder (try after 1m, then 5m, then 15m, then fail)
retryPolicy: {
    maxAttempts: 4, // 1st run + 3 retries
    type: 'series',
    intervals: ['1m', '5m', '15m']
}

// 3. Series with last interval reuse
// Sequence: 1m, 5m, 5m, 5m ... (last one repeats)
retryPolicy: {
    maxAttempts: 10,
    type: 'series',
    intervals: ['1m', '5m']
}

// 4. Permanent retries every hour
retryPolicy: {
    maxAttempts: -1,
    type: 'fixed',
    interval: '1h'
}