Files
swingmusic-extended/app/crons/__init__.py
T
2024-11-01 12:40:37 +03:00

19 lines
318 B
Python

import time
import schedule
from app.crons.mixes import Mixes
from app.utils.threading import background
@background
def start_cron_jobs():
"""
This is the function that triggers the cron jobs.
"""
Mixes()
schedule.run_all()
while True:
schedule.run_pending()
time.sleep(1)