Background
PR #714 introduced a centralized JobScheduler class in server/src/addie/jobs/scheduler.ts to manage scheduled background jobs. Currently it handles:
- Document indexer (hourly)
- Summary generator (daily)
Remaining Jobs to Migrate
The following jobs are still defined inline in server/src/http.ts and should be migrated to the scheduler:
- Content curator - Curates and processes content
- Feed fetcher - Fetches RSS/Atom feeds
- Alert processor - Processes scheduled alerts
- Task reminder - Sends task reminders
- Engagement scoring - Updates engagement scores
- Goal follow-up - Follows up on goals
Benefits of Migration
- Centralized job management in one place
- Easier to add new jobs following established pattern
- Consistent logging with
job-scheduler module tag
- Cleaner
http.ts file
- Foundation for future job management features (pause/resume, admin visibility)
Implementation Notes
Each job should follow the existing pattern:
- Initial delay on startup (staggered to avoid thundering herd)
- Periodic interval
- Proper error handling with logging
- Start/stop methods on the scheduler class
Acceptance Criteria
Background
PR #714 introduced a centralized
JobSchedulerclass inserver/src/addie/jobs/scheduler.tsto manage scheduled background jobs. Currently it handles:Remaining Jobs to Migrate
The following jobs are still defined inline in
server/src/http.tsand should be migrated to the scheduler:Benefits of Migration
job-schedulermodule taghttp.tsfileImplementation Notes
Each job should follow the existing pattern:
Acceptance Criteria
scheduler.tshttp.ts