• Blog
  • Changelog
  • Follow us on GitHubFollow us on XJoin our Discord server
  • Blog
  • GitHub
  • Releases
  • Getting started

    • Overview
  • Library

    • Getting started
    • Array
    • Result
    • Dependency injection
    • Resource management
    • Task
    • Type
    • Conventions
  • Local-first

    • Getting started
    • Playgrounds
    • Examples
    • Owners
    • Relay
    • Migrations
    • Time travel
    • Indexes
    • Protocol
    • Privacy
    • FAQ
  • Other

    • API reference
    • Comparison
    • Showcase
    • Changelog

API reference › @evolu/common › Schedule › recurs

function recurs(n: number): Schedule<number>;

Defined in: packages/common/src/Schedule.ts:184

A schedule that recurs a fixed number of times.

Convenience for take(n)(forever). Outputs the current repetition count (0, 1, 2, ..., n-1).

Example

// Retry up to 3 times (4 total attempts including initial)
const retry = recurs(3);
Markdown for LLMs

© 2026 Evolu

Follow us on GitHubFollow us on XJoin our Discord server