my goal is very simple: starting a periodicCallback at a specific time. I tried to look everywhere but all the examples read are related to a timedelta of the current time and not to a defined time.
I write a simple example.
import tornado.ioloop
import datetime
from datetime import date, time
from tornado.ioloop import IOLoop, PeriodicCallback
def startService():
print("periodic thing")
def periodicCallback():
periodic = PeriodicCallback(callback=startService,callback_time=5000)
periodic.start()
if __name__ == "__main__":
main_loop = IOLoop.instance()
# I want to set a specific time
starting_time = time(14, 30, 00)
# After this time i would want to have the message "periodic thing" every callback_time
(...)
#my first test but i have error about deadline unsupported:
IOLoop.current().add_timeout(starting_time, periodicCallback)
main_loop.start()
thanks for help