Answer the question
In order to leave comments, you need to log in
Executing a method at a specific time?
Good afternoon, the question is the following. There is a function from a specific bot class. The bot will constantly work to receive and send responses to clients. But it is necessary to implement that a certain function of sending a message to the client is executed at a well-defined time. How to implement so that the body of the function is executed at a well-defined time, for example at 13:00, every day?
def sendMess(self):
users = user.infoUserDB()
temp = dic.set_phr()
for chatid in users:
for tem in temp:
bot.send_message(chatid[1],tem[1])
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question