[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Schedule](https://evolu.dev/docs/api-reference/common/Schedule) › maxDelay

```ts
function maxDelay(
  max: Duration,
): <Output, Input>(
  schedule: Schedule<Output, Input>,
) => Schedule<Output, Input>;
```

Defined in: [packages/common/src/Schedule.ts:624](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/Schedule.ts#L624)

Caps the delay to a maximum value.

If the schedule returns a delay greater than `max`, returns `max` instead.

### Example

```ts
// Exponential capped at 10 seconds
const capped = maxDelay("10s")(exponential("1s"));
// 1s, 2s, 4s, 8s, 10s, 10s, 10s, ...
```