I want to take the function every hour run , but if i insert my code into the bot file, he stop working:
now = datetime.datetime.now()      
today = now.day
hour = round(now.hour, 2)
while True:
    if today == now.day and (hour > 22.00 and hour < 23.00):
        bot.send_message(CHAT_ID, random.choice(welcomes))
        today += 1
    else:
        time.sleep(3600)
How i can fix it and to realize this function?
 
    