code: public void shutdown (final boolean waitForJobsToComplete)
    {
  
      if (m_bShuttingDown || m_bClosed)
      {
        return;
      }
  
      m_bShuttingDown = true;
  
      LOGGER.info ("Scheduler " + m_aResources.getUniqueIdentifier () + " shutting down.");
  
      standby ();
  
      m_aSchedThread.halt (waitForJobsToComplete);
  
      notifySchedulerListenersShuttingdown ();
  
      if ((m_aResources.isInterruptJobsOnShutdown () && !waitForJobsToComplete) ||
          (m_aResources.isInterruptJobsOnShutdownWithWait () && waitForJobsToComplete))
      {
        final ICommonsList <IJobExecutionContext> jobs = getCurrentlyExecutingJobs ();
        for (final IJobExecutionContext job : jobs)
        {
          if (job.getJobInstance () instanceof IInterruptableJob)
            try
            {
              ((IInterruptableJob) job.getJobInstance ()).interrupt ();
            }
            catch (final Throwable e)
            {
              // do nothing, this was just a courtesy effort
              LOGGER.warn ("Encountered error when interrupting job {} during shutdown: {}",
                           job.getJobDetail ().getKey (),
                           e);
            }
        }
      }
  
      m_aResources.getThreadPool ().shutdown (waitForJobsToComplete);
  
      m_bClosed = true;
  
      _shutdownPlugins ();
  
      m_aResources.getJobStore ().shutdown ();
  
      notifySchedulerListenersShutdown ();
  
      SchedulerRepository.getInstance ().remove (m_aResources.getName ());
  
      holdToPreventGC.clear ();
  
      LOGGER.info ("Scheduler " + m_aResources.getUniqueIdentifier () + " shutdown complete.");
    }
docs: <p>
  Halts the <code>QuartzScheduler</code>'s firing of
  <code>{@link com.helger.quartz.ITrigger}s</code>, and cleans up all
  resources associated with the QuartzScheduler.
  </p>
  <p>
  The scheduler cannot be re-started.
  </p>
  
  @param waitForJobsToComplete
  if <code>true</code> the scheduler will not allow this method to
  return until all currently executing jobs have completed.