Parent
#6
What to build
Nothing runs on a schedule today — digests and alert evaluations only happen when a user manually triggers them. Add a background scheduler: a single exported tick function runs due digests for all users and evaluates alert rules, and the framework instrumentation hook starts an interval that calls it. Environment variables control whether the scheduler is enabled and the interval length. The tick is idempotent and guarded against overlapping runs (a tick that is still running prevents the next from starting concurrently). The existing manual trigger endpoint remains unchanged for external-cron deployments.
Acceptance criteria
Blocked by
Parent
#6
What to build
Nothing runs on a schedule today — digests and alert evaluations only happen when a user manually triggers them. Add a background scheduler: a single exported tick function runs due digests for all users and evaluates alert rules, and the framework instrumentation hook starts an interval that calls it. Environment variables control whether the scheduler is enabled and the interval length. The tick is idempotent and guarded against overlapping runs (a tick that is still running prevents the next from starting concurrently). The existing manual trigger endpoint remains unchanged for external-cron deployments.
Acceptance criteria
globalThis.fetchswapped); the interval wiring in the instrumentation hook stays as untested glue;npm testgreenBlocked by