[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) › resetScheduleAfter

```ts
function resetScheduleAfter(
  duration:
    | DurationLiteral
    | (number &
        Brand<"NonNaN"> &
        Brand<"Finite"> &
        Brand<"Int"> &
        Brand<"NonNegative"> &
        Brand<"LessThan281474976710655"> &
        Brand<"Millis"> &
        Brand<"Positive">),
): <Output, Input>(
  schedule: Schedule<Output, Input>,
) => Schedule<Output, Input>;
```

Defined in: [packages/common/src/Schedule.ts:1343](https://github.com/evoluhq/evolu/blob/dd96d79f1dbe9a49fa12ce8e0aa7d3d0177795ca/packages/common/src/Schedule.ts#L1343)

Resets a running schedule after a period of inactivity.

Before each step, if the time since the previous step is at least `duration`,
replaces the wrapped schedule with fresh state. Once the wrapped schedule
returns `Done`, termination is final.

### Resetting after inactivity

```ts
import {
  assertOk,
  exponential,
  resetScheduleAfter,
  testCreateDeps,
} from "@evolu/common";

const backoff = resetScheduleAfter("1m")(exponential("1s"));
const deps = testCreateDeps();
const step = backoff(deps);
assertOk(step(undefined), [1000, 1000]);
deps.time.advance("1m");
assertOk(step(undefined), [1000, 1000]);
```