Files
NHL-Scoreboard/app/scheduler.py
josh a4dc7dff52
All checks were successful
CI / Lint (push) Successful in 5s
CI / Test (push) Successful in 6s
CI / Build & Push (push) Successful in 16s
refactor: flatten app/scoreboard/ subpackage and rename files for clarity
2026-03-29 10:16:35 -04:00

19 lines
427 B
Python

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