$ pip install --upgrade kuroko
import kuroko
class MyBot(kuroko.Bot):
@kuroko.timer(5)
def echo_pong(self):
print("hoge")
bot = MyBot()
bot.start()
>>> from crontab import CronTab
>>> c = CronTab('*/5 * * * *')
>>> c.next()
21.400852
from kuroko import Bot, crontab
class MyBot(Bot):
@crontab('* 1 * * *')
def echo_pong(self):
print("hoge")
bot = MyBot()
bot.start()