Y
Y
Yzurgzd2020-04-17 14:34:47
Python
Yzurgzd, 2020-04-17 14:34:47

Why doesn't schedule work?

I use the aiogram library to write a Telegram bot.

async def msg():
    await bot.send_message(config.admin_id, 'test')

schedule.every(1).minutes.do(msg)
while True:
    schedule.run_pending()
    time.sleep(1)

Sending messages is not working. What's my mistake?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question