def init(): # bind a ioloop or use default ioloop chronos.setup() # chronos.setup(tornado.ioloop.IOLoop()) chronos.schedule('say', chronos.every_second(1), say) chronos.schedule('say2', chronos.every_second(1), test_process, once=True, process=True) chronos.schedule('say3', chronos.every_second(1), lambda: test("test3")) chronos.start(True)
def init(): # bind a ioloop or use default ioloop chronos.setup() # chronos.setup(tornado.ioloop.IOLoop()) chronos.schedule('search', chronos.every(2).hours, search) chronos.start(True)
def setUp(self): chronos.setup(tornado.ioloop.IOLoop())