Files
NHL-Scoreboard/app/scheduler.py
josh dd5ac945bd
All checks were successful
CI / Lint (push) Successful in 7s
CI / Test (push) Successful in 5s
CI / Build & Push (push) Successful in 14s
refactor: rename functions across codebase for clarity
2026-03-29 10:21:01 -04:00

19 lines
408 B
Python

import logging
import time
import schedule
from app.api import refresh_scores
from app.standings import refresh_standings
logger = logging.getLogger(__name__)
def start_scheduler():
schedule.every(600).seconds.do(refresh_standings)
schedule.every(10).seconds.do(refresh_scores)
logger.info("Background scheduler started")
while True:
schedule.run_pending()
time.sleep(1)