'Adds the given job to the job list and notifies the scheduler thread.
Any extra keyword arguments are passed along to the constructor of the
:class:`~apscheduler.job.Job` class (see :ref:`job_options`).
:param trigger: trigger that determines when ``func`` is called
:param func: callable to run at the given time
:param args: list of positional arguments to call func with
:param kwargs: dict of keyword arguments to call func with
:param jobstore: alias of the job store to store the job in
:rtype: :class:`~apscheduler.job.Job`'

def add_job(self, trigger, func, args, kwargs, jobstore='default', **options):

    job = Job(trigger, func, (args or []), (kwargs or {}), options.pop('misfire_grace_time', self.misfire_grace_time), options.pop('coalesce', self.coalesce), **options)
    if (not self.running):
        self._pending_jobs.append((job, jobstore))
        logger.info('Adding    job    tentatively    --    it    will    be    properly    scheduled    when    the    scheduler    starts')
    else:
        self._real_add_job(job, jobstore, True)
    return job
