How to run functions outside websocket loop in python (tornado)
You could call a IOLoop.add_timeout(deadline, callback) that calls the callback at specified deadline timeout (one shot, but you can reschedule), or use the tornado.ioloop.PeriodicCallback if you have a more periodic task. See: http://www.tornadoweb.org/en/stable/ioloop.html#tornado.ioloop.IOLoop.add_timeout Update: some example import datetime def test(): print “scheduled event fired” … if __name__ == “__main__”: http_server = tornado.httpserver.HTTPServer(application) http_server.listen(8888) main_loop = … Read more