mirror of
https://github.com/Balshgit/mosgortrans.git
synced 2025-12-16 21:50:39 +03:00
add apscheduler
This commit is contained in:
6
main.py
6
main.py
@@ -48,12 +48,6 @@ def asyncio_schedule():
|
|||||||
scheduler.add_job(send_message, 'interval', seconds=3)
|
scheduler.add_job(send_message, 'interval', seconds=3)
|
||||||
scheduler.start()
|
scheduler.start()
|
||||||
|
|
||||||
# Execution will block here until Ctrl+C (Ctrl+Break on Windows) is pressed.
|
|
||||||
try:
|
|
||||||
asyncio.get_event_loop().run_forever()
|
|
||||||
except (KeyboardInterrupt, SystemExit):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
async def on_startup(dp) -> None:
|
async def on_startup(dp) -> None:
|
||||||
await bot.set_webhook(WEBHOOK_URL)
|
await bot.set_webhook(WEBHOOK_URL)
|
||||||
|
|||||||
Reference in New Issue
Block a user