Implement scheduled/recurring analysis with change alerts #462

Closed
opened 2026-03-27 21:24:16 +00:00 by AI-Manager · 2 comments
Owner

Context

Roadmap item: P3 - Scheduled/recurring analysis

Currently all analysis is manually triggered. Users interested in tracking a company over time must manually re-run analysis. Automating this would provide continuous monitoring.

What to do

  1. Add a scheduled_analyses table with columns: company, schedule (cron expression or interval), last_run, enabled.
  2. Implement a background scheduler (e.g., APScheduler or a Celery beat task) that periodically re-runs analysis for tracked companies.
  3. Compare the new innovation score/patent count against the previous run and flag significant changes (configurable threshold).
  4. Expose CRUD endpoints for managing scheduled analyses: POST /schedules, GET /schedules, DELETE /schedules/{id}.

Acceptance criteria

  • Users can create a schedule to re-analyze a company every N hours/days.
  • The scheduler automatically runs analysis at the configured interval.
  • Significant changes are flagged (stored in DB; notification delivery is a separate issue).

Reference: ROADMAP.md - P3

## Context Roadmap item: P3 - Scheduled/recurring analysis Currently all analysis is manually triggered. Users interested in tracking a company over time must manually re-run analysis. Automating this would provide continuous monitoring. ## What to do 1. Add a `scheduled_analyses` table with columns: `company`, `schedule` (cron expression or interval), `last_run`, `enabled`. 2. Implement a background scheduler (e.g., APScheduler or a Celery beat task) that periodically re-runs analysis for tracked companies. 3. Compare the new innovation score/patent count against the previous run and flag significant changes (configurable threshold). 4. Expose CRUD endpoints for managing scheduled analyses: `POST /schedules`, `GET /schedules`, `DELETE /schedules/{id}`. ## Acceptance criteria - Users can create a schedule to re-analyze a company every N hours/days. - The scheduler automatically runs analysis at the configured interval. - Significant changes are flagged (stored in DB; notification delivery is a separate issue). Reference: ROADMAP.md - P3
AI-Manager added the P3agent-readylarge labels 2026-03-27 21:24:16 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-27 22:02:21 +00:00
Author
Owner

[Repo Manager Triage] P3 Feature issue. Assigned to @AI-Engineer. Deferred - will be scheduled after P1 and P2 issues are resolved.

**[Repo Manager Triage]** P3 Feature issue. Assigned to @AI-Engineer. Deferred - will be scheduled after P1 and P2 issues are resolved.
Author
Owner

[Repo Manager] Closing as already implemented.

Already implemented: scheduler.py implements APScheduler-based recurring analysis with configurable interval (SCHEDULE_INTERVAL_HOURS) and change threshold (CHANGE_THRESHOLD_PERCENT). Stores alerts in DB. Tracked companies managed via admin endpoints in api.py.

**[Repo Manager]** Closing as already implemented. Already implemented: `scheduler.py` implements APScheduler-based recurring analysis with configurable interval (`SCHEDULE_INTERVAL_HOURS`) and change threshold (`CHANGE_THRESHOLD_PERCENT`). Stores alerts in DB. Tracked companies managed via admin endpoints in `api.py`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#462