i have a function to execute cron job as
def add_config_job(sched, job):
module = JOB_METHODS.get(job["type"])
if module is None:
logging.warn("job type %r not supported", job["type"])
return
func = module.cron_job
args = (job,)
name = "%s__%s" % (job["name"], job["id"])
start_date = job.get("start_date")
run_at = job["run_at"]
if isinstance(job["run_at"], dict):
sched.add_cron_job(func, args=args, name=name, start_date=start_date,
**run_at)
elif isinstance(job["run_at"], basestring):
sched.add_date_job(func, args=args, name=name, date=run_at)
else:
logging.warn("unsupported 'run_at' type (%s given)", run_at)
and I get the error as missed job by some seconds as
2015-05-14_00:00:02.76629 WARNING: Run time of job "Daily VPN Connexion__1 (trigger: cron[day='*', hour='0', minute='0', second='0'], next run at: 2015-05-14 00:00:00)" was missed by 0:00:02.493426
2015-05-14_00:00:02.79309 WARNING: Run time of job "Daily Report VPN Connection ALIGRO__1 (trigger: cron[day='*', hour='0', minute='0', second='0'], next run at: 2015-05-14 00:00:00)" was missed by 0:00:02.777450
what is the cause of this misfiring of the job? how can we avoid it? in some pages I found to increase the misfire_grace_time from the default of 1 second. shouldn't be the scheduler schedule in proper time without missing it?