def __init__(self): cron = getCronTab() if cron: cron.add(CronEvent(refreshStats, 0, range(0, 24))) else: logging.debug("No Cron Object found, cannot add refresh stats cron job")
def startCron(): logging.debug("Initializing cronjob...") cronTab = cron.getCronTab() cronTab.run()