Fixed and added all the stats_service.py methods

This commit is contained in:
bnair123
2025-12-25 17:48:41 +04:00
parent d63a05fb72
commit 508d001d7e
4 changed files with 580 additions and 245 deletions

16
backend/run_scheduler.py Normal file
View File

@@ -0,0 +1,16 @@
import schedule
import time
from run_analysis import run_analysis_pipeline
def job():
print("Running daily analysis...")
# Analyze last 24 hours
run_analysis_pipeline(days=1)
# Schedule for 03:00 AM
schedule.every().day.at("03:00").do(job)
print("Scheduler started...")
while True:
schedule.run_pending()
time.sleep(60)