mirror of
https://github.com/Balshgit/mosgortrans.git
synced 2025-12-16 21:50:39 +03:00
add cron timer
This commit is contained in:
4
main.py
4
main.py
@@ -44,13 +44,13 @@ def asyncio_schedule() -> None:
|
|||||||
from apscheduler.schedulers.asyncio import AsyncIOScheduler
|
from apscheduler.schedulers.asyncio import AsyncIOScheduler
|
||||||
|
|
||||||
scheduler = AsyncIOScheduler()
|
scheduler = AsyncIOScheduler()
|
||||||
scheduler.add_job(send_message, kwargs={'chat_ids': [417070387, ]}, trigger='cron', hour=19, minute=11, second=42)
|
scheduler.add_job(send_message, kwargs={'chat_ids': [417070387, ]}, trigger='cron', hour=19, minute=12, second=42)
|
||||||
scheduler.start()
|
scheduler.start()
|
||||||
|
|
||||||
|
|
||||||
async def on_startup(dp) -> None:
|
async def on_startup(dp) -> None:
|
||||||
await bot.set_webhook(WEBHOOK_URL)
|
await bot.set_webhook(WEBHOOK_URL)
|
||||||
# asyncio_schedule()
|
asyncio_schedule()
|
||||||
|
|
||||||
|
|
||||||
async def on_shutdown(dp):
|
async def on_shutdown(dp):
|
||||||
|
|||||||
Reference in New Issue
Block a user