mirror of
https://github.com/bnair123/MusicAnalyser.git
synced 2026-02-25 19:56:06 +00:00
16 lines
342 B
Python
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) |