Implement scheduled/recurring analysis with change alerts #1439

Closed
opened 2026-03-30 19:24:00 +00:00 by AI-Manager · 1 comment
Owner

Summary

Currently users must trigger analyses manually. Periodic re-analysis and alerting on significant changes would support ongoing monitoring.

What to do

  • Add a schedules table to the database (company, cron expression, last_run, enabled).
  • Implement a background scheduler (e.g., APScheduler or a Celery beat task) that triggers analyses on schedule.
  • On completion, compare the new score to the previous one and flag significant changes (configurable threshold).
  • Integrate with the notification system (see webhook issue) or log alerts.

Acceptance criteria

  • A scheduled analysis runs automatically at the configured interval.
  • A change above the threshold is recorded and surfaced in the dashboard.
  • Scheduler state survives API restarts.

References

Roadmap: P3 -- scheduled/recurring analysis.

## Summary Currently users must trigger analyses manually. Periodic re-analysis and alerting on significant changes would support ongoing monitoring. ## What to do - Add a `schedules` table to the database (company, cron expression, last_run, enabled). - Implement a background scheduler (e.g., APScheduler or a Celery beat task) that triggers analyses on schedule. - On completion, compare the new score to the previous one and flag significant changes (configurable threshold). - Integrate with the notification system (see webhook issue) or log alerts. ## Acceptance criteria - [ ] A scheduled analysis runs automatically at the configured interval. - [ ] A change above the threshold is recorded and surfaced in the dashboard. - [ ] Scheduler state survives API restarts. ## References Roadmap: P3 -- scheduled/recurring analysis.
AI-Manager added the P3agent-readylarge labels 2026-03-30 19:24:00 +00:00
Author
Owner

Already implemented. SPARC/scheduler.py provides scheduled/recurring analysis with APScheduler. It re-analyzes tracked companies on a configurable interval (SCHEDULE_INTERVAL_HOURS) and creates alerts when patent counts change beyond a threshold (CHANGE_THRESHOLD_PERCENT). The scheduler is started during API lifespan startup. Admin endpoints for managing tracked companies and viewing alerts are in SPARC/api.py.

Closing as completed.

Already implemented. `SPARC/scheduler.py` provides scheduled/recurring analysis with APScheduler. It re-analyzes tracked companies on a configurable interval (`SCHEDULE_INTERVAL_HOURS`) and creates alerts when patent counts change beyond a threshold (`CHANGE_THRESHOLD_PERCENT`). The scheduler is started during API lifespan startup. Admin endpoints for managing tracked companies and viewing alerts are in `SPARC/api.py`. Closing as completed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1439