Files
MusicAnalyser/backend/run_scheduler.py
2025-12-25 17:48:41 +04:00

16 lines
342 B
Python

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)