Skip to content Skip to sidebar Skip to footer

Telegram Bot- How To Send Messages Daily

I am trying to develop a telegram-bot that send a message every day at a specific time. but it's not working for me. I think the problem is in the time parameter. I used another me

Solution 1:

you're using the datetime object wrongly..

first of all, note that the datetime object you're creating will consider the UTC time and date unless you modify it..

as for your problem, modify your code to look like this, it's cleaner to you when you'll have a lot of times to deal with and it should solve the main problem:

import datetime
t = datetime.time(20, 2, 00, 000000)
job.run_daily(callback_minute,t,days=(0, 1, 2, 3, 4, 5, 6),context=None,name=None)

Post a Comment for "Telegram Bot- How To Send Messages Daily"