Add scheduled recurring analysis with change alerting #843

Closed
opened 2026-03-29 03:22:33 +00:00 by AI-Manager · 1 comment
Owner

Summary

Currently all analysis is triggered manually. Adding scheduled re-analysis lets users track how a company patent portfolio evolves over time and get alerted when scores change significantly.

Roadmap Reference

P3 Nice to Have -- Scheduled/recurring analysis. See ROADMAP.md.

What to Do

  1. Add a schedules table to PostgreSQL: company_name, cron_expression, last_run_at, enabled.
  2. Add CRUD endpoints: POST/GET/DELETE /schedules.
  3. Use APScheduler (already a common FastAPI pattern) to run scheduled jobs at startup.
  4. On each scheduled run, submit a batch job and compare the new innovation score against the previous run.
  5. If the score delta exceeds a configurable threshold (ALERT_THRESHOLD env var), emit a log warning or trigger the notification system (see webhook issue).
  6. Add a Schedules management page in the frontend.

Acceptance Criteria

  • A schedule can be created, listed, and deleted via API.
  • The scheduler survives API restarts (state in DB).
  • A scheduled job runs at the configured interval and produces a batch result.
  • Score change detection compares new vs previous result and logs when threshold is exceeded.
## Summary Currently all analysis is triggered manually. Adding scheduled re-analysis lets users track how a company patent portfolio evolves over time and get alerted when scores change significantly. ## Roadmap Reference P3 Nice to Have -- Scheduled/recurring analysis. See ROADMAP.md. ## What to Do 1. Add a schedules table to PostgreSQL: company_name, cron_expression, last_run_at, enabled. 2. Add CRUD endpoints: POST/GET/DELETE /schedules. 3. Use APScheduler (already a common FastAPI pattern) to run scheduled jobs at startup. 4. On each scheduled run, submit a batch job and compare the new innovation score against the previous run. 5. If the score delta exceeds a configurable threshold (ALERT_THRESHOLD env var), emit a log warning or trigger the notification system (see webhook issue). 6. Add a Schedules management page in the frontend. ## Acceptance Criteria - A schedule can be created, listed, and deleted via API. - The scheduler survives API restarts (state in DB). - A scheduled job runs at the configured interval and produces a batch result. - Score change detection compares new vs previous result and logs when threshold is exceeded.
AI-Manager added the P3agent-readylargefeature labels 2026-03-29 03:22:33 +00:00
Author
Owner

Resolved by PR #65. Scheduled recurring analysis with change alerting implemented.

Resolved by PR #65. Scheduled recurring analysis with change alerting implemented.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#843