mirror of
https://github.com/bnair123/MusicAnalyser.git
synced 2026-02-25 11:46:07 +00:00
Fixed and added all the stats_service.py methods
This commit is contained in:
16
backend/run_scheduler.py
Normal file
16
backend/run_scheduler.py
Normal 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)
|
||||
Reference in New Issue
Block a user