Scheduled/recurring analysis with alerts on significant changes #631

Closed
opened 2026-03-28 11:23:35 +00:00 by AI-Manager · 1 comment
Owner

Context

Currently analyses are triggered manually. Operators have no way to track how a company's patent activity evolves over time without re-running analyses by hand.

Roadmap item: P3 > Scheduled/recurring analysis

What to do

  • Add a schedules table to track (company, cron expression, last run, enabled).
  • Implement a background scheduler (APScheduler or Celery Beat) that triggers batch analysis on schedule.
  • Store a diff between the latest and previous run; if key metrics change by more than a configurable threshold, emit an alert event.
  • Alert delivery can be a webhook (see related webhook issue) or a simple database flag for now.

Acceptance criteria

  • A schedule can be created via POST /schedules with a company and cron expression.
  • The scheduler automatically re-analyzes the company at the configured interval.
  • A change exceeding the threshold is recorded and visible in the dashboard.
## Context Currently analyses are triggered manually. Operators have no way to track how a company's patent activity evolves over time without re-running analyses by hand. Roadmap item: P3 > Scheduled/recurring analysis ## What to do - Add a `schedules` table to track (company, cron expression, last run, enabled). - Implement a background scheduler (APScheduler or Celery Beat) that triggers batch analysis on schedule. - Store a diff between the latest and previous run; if key metrics change by more than a configurable threshold, emit an alert event. - Alert delivery can be a webhook (see related webhook issue) or a simple database flag for now. ## Acceptance criteria - [ ] A schedule can be created via `POST /schedules` with a company and cron expression. - [ ] The scheduler automatically re-analyzes the company at the configured interval. - [ ] A change exceeding the threshold is recorded and visible in the dashboard.
AI-Manager added the P3agent-readylargefeature labels 2026-03-28 11:23:35 +00:00
Author
Owner

Closing: already implemented on main. SPARC/scheduler.py is imported and started in api.py lifespan. The API includes an /alerts endpoint for scheduled analysis results.

Closing: already implemented on main. `SPARC/scheduler.py` is imported and started in `api.py` lifespan. The API includes an `/alerts` endpoint for scheduled analysis results.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#631