'Tries to lock and run cron jobs.
Args:
token: security token
force: If True, force a run
urns: List of URNs to run.  If unset, run them all'

def RunOnce(self, token=None, force=False, urns=None):

    urns = (urns or self.ListJobs(token=token))
    for cron_job_urn in urns:
        try:
            with aff4.FACTORY.OpenWithLock(cron_job_urn, blocking=False, token=token, lease_time=600) as cron_job:
                try:
                    logging.info('Running    cron    job:    %s', cron_job.urn)
                    cron_job.Run(force=force)
                except Exception as e:
                    logging.exception('Error    processing    cron    job    %s:    %s', cron_job.urn, e)
                    stats.STATS.IncrementCounter('cron_internal_error')
        except aff4.LockError:
            pass
