Answer the question
In order to leave comments, you need to log in
How to implement self-repeating function with timer in aiogram/pyTelegramBotAPI?
Good day!
There is a function that sends messages to bot users.
You need to make sure that this function works every hour.
How can and how best to implement this if my bot works on webhooks?
Thanks in advance to everyone for the replies.
Answer the question
In order to leave comments, you need to log in
Run in a separate thread (or coroutine, depending on what's inside) while True: sleep(3600) and send.
Or just add a send script to cron.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question