'Main CronHook method.'

def RunOnce(self):

    stats.STATS.RegisterCounterMetric('cron_internal_error')
    stats.STATS.RegisterCounterMetric('cron_job_failure', fields=[('cron_job_name', str)])
    stats.STATS.RegisterCounterMetric('cron_job_timeout', fields=[('cron_job_name', str)])
    stats.STATS.RegisterEventMetric('cron_job_latency', fields=[('cron_job_name', str)])
    if config.CONFIG['Cron.active']:
        self.cron_worker = CronWorker()
        self.cron_worker.RunAsync()
