'Starts the scheduler in a new thread.
In threaded mode (the default), this method will return immediately
after starting the scheduler thread.
In standalone mode, this method will block until there are no more
scheduled jobs.'

def start(self):

    if self.running:
        raise SchedulerAlreadyRunningError
    if (not ('default' in self._jobstores)):
        self.add_jobstore(RAMJobStore(), 'default', True)
    for (job, jobstore) in self._pending_jobs:
        self._real_add_job(job, jobstore, False)
    del self._pending_jobs[:]
    self._stopped = False
    if self.standalone:
        self._main_loop()
    else:
        self._thread = Thread(target=self._main_loop, name='APScheduler')
        self._thread.setDaemon(self.daemonic)
        self._thread.start()
