Skip to content

Scheduler

Checks each source as often as it posts (SI-522). Code: packages/core/src/scheduler/. It’s a plain loop in the app process, not durable tasks (ADR-0004). In the app: Sources (/sources).

The loop

Every minute, the scheduler takes up to 200 sources whose next_fetch_at has passed (or that were never fetched), most overdue first. Only sources that at least one user follows without pausing count, and only types that are fetched at all: links added by hand never are (source-types.md). It hands them to the fetcher (feeds.md), whose pool limits how many run at once and how often each host is asked. A source that is already being fetched, by the loop or by “Refresh now”, isn’t started twice. Once a day, the loop also prunes item content older than 90 days (data-model.md). Every round, it gives back the items of filter rules that have expired (filters.md).

The web server starts the loop. CLI scripts and tests don’t. SCHEDULER_ENABLED=false turns it off, as the Playwright tests do.

The next fetch

After every fetch, however it was started, nextSchedule() sets the source’s status, its interval and its next fetch time:

After the fetch Status Next fetch
Fetched fine (or 304) ok A third of the typical gap between its posts. The gap is the median of its last 20 posts (within 90 days), or half the time since its newest post if that’s longer, so a source that went quiet is checked less often. Until it has posted twice: every 6 hours
Fetched fine, newest post older than 90 days hibernating Once a week. Back to ok on its next post
Failed failing Backoff: 15 min, 30 min, 1 h, … doubling per failure in a row, up to a week. Longer if the server sent Retry-After
Failed 10 times in a row (about 10 days), or 410 Gone dead Once a week, so it comes back by itself if the feed does

Every interval stays between the minimum (15 minutes, SCHEDULER_MIN_INTERVAL_MINUTES, 5–60) and a week. Up to 20 % is added at random, so sources added together don’t stay in step.

Measured

With the 1,021 sources from the Inoreader export on 2026-11-12:

  • Status: 614 ok, 379 hibernating and 28 failing.
  • Intervals: 9 sources every 15 minutes, 41 up to hourly, 47 up to 6-hourly, 147 up to daily, 155 up to every 3 days, 118 up to weekly and 504 weekly.
  • Load: about 3,600 fetches a day (2.5 per minute). Checking every source hourly would be 24,500.
  • Catch-up: fetching everything due after an import took 199 s, in 5 ticks.

In the app and the API

The Sources page lists every subscription with its status, last and next check, interval, newest item and last error, and a Refresh now button. A refresh fetches the source right away and schedules the next fetch from the result.

GET /api/v1/subscriptions The subscriptions with each source’s status, lastFetchedAt, nextFetchAt, fetchIntervalSeconds, consecutiveFailures and lastError
POST /api/v1/sources/:id/refresh Refresh now. 404 if the user doesn’t follow the source. Needs a session or a write token

In the SDK: subscriptions() and refreshSource(id).