Skip to content

Implement nightly retention cohort rollup job #547

Description

@phertyameen

Description

Add a @Cron job that updates RetentionCohort rows nightly for all cohorts within the tracked window (e.g. last 90 days).

Why this matters

Retention curves need daily recomputation as more users cross day-1/7/30 thresholds relative to their signup cohort.

Files to touch

  • backend/src/analytics/jobs/retention-cohort-rollup.job.ts

Acceptance Criteria

  • Job updates only affected cohort/day-offset rows, not the full history
  • Job completes within an acceptable time budget on seeded test data

Notes

This issue is part of the new analytics module effort (tracking, aggregation,
and reporting on player/game activity). Please keep new code inside
backend/src/analytics/ following the same module/controller/service/provider
layout used by existing modules (e.g. progress, streak, quests).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions