bot refactor
This commit is contained in:
10
bot/utils/scheduler.py
Normal file
10
bot/utils/scheduler.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from apscheduler.schedulers.asyncio import AsyncIOScheduler
|
||||
from bot.operations.notifications import schedule_notifications
|
||||
|
||||
|
||||
def setup_scheduler():
|
||||
"""Настройка планировщика уведомлений."""
|
||||
print("Настройка планировщика...")
|
||||
scheduler = AsyncIOScheduler()
|
||||
scheduler.add_job(schedule_notifications, "cron", minute="*")
|
||||
return scheduler
|
||||
Reference in New Issue
Block a user