'Shuts down the scheduler. Does not interrupt any currently running jobs.
:param bool wait: ``True`` to wait until all currently executing jobs have finished
:raises SchedulerNotRunningError: if the scheduler has not been started yet'

@abstractmethod
def shutdown(self, wait=True):

    if (not self.running):
        raise SchedulerNotRunningError
    self._stopped = True
    for executor in six.itervalues(self._executors):
        executor.shutdown(wait)
    for jobstore in six.itervalues(self._jobstores):
        jobstore.shutdown()
    self._logger.info('Scheduler    has    been    shut    down')
    self._dispatch_event(SchedulerEvent(EVENT_SCHEDULER_SHUTDOWN))
