Who runs tasks on a schedule. Time-based triggers are born here; event-driven triggers (a module calls the queue directly) bypass the scheduler. Where a task lands and who works it off — across three lanes; what stops a double run — uniqueness.
CronJob out of the box — no second scheduler
needed. It lives on a dedicated singleton service (one
replica), separate from the horizontally scalable worker pool: were
cron on every worker, with N replicas it would fire
N times. The scheduler only publishes a
task to a lane — the workers execute.
The scheduler is fed by two trigger sources — both publish to a lane, and from there the task's path is shared:
CronJob by the calendar — one tick publishes one
task: sync, reconcile, health probe, curation, backup.
next_run_at scannext_run_at has already
arrived. The owner sets the time, the scheduler only wakes it.
skipped. A missed tick (the singleton was down
during the scheduled window) is acceptable too — we don't backfill, we
wait for the next window: the cadences are coarse, and one miss is made
up by the next run. The scheduler is responsible for “when”; the
correctness of a single instance is on
uniqueness.
HH:MM, minute
of the week). At launch the scheduler unfolds the window to UTC via
platform_settings.timezone (IANA); agent schedules — via
the owner's timezone (NULL → the
organization's zone). A single platform contract: set and display in
local time, store and tick in UTC — as in Harvester and Agent Engine.
N hours”,
“weekly at HH:MM”. A rich / dynamic cron (per-source
windows, editing from the UI) — v2.
| Schedule | Cadence | Lane | Consumer |
|---|---|---|---|
| Incremental sync | 6 h (webhooks) / 15 min (polling-only) | background | → Harvester |
| Reconcile | weekly | background | → Harvester |
| Source health probe | once a day | background | → Harvester |
| Curation pass | one platform-wide schedule | background | → Knowledge Store |
| Backup | its own schedule | background | → Knowledge Store |
| Agent scan | the scheduler scans next_run_at |
agents | → Agent Engine |