code: @SneakyThrows
  	public void gracefullyShutdown(Duration timeout) {
  		logger.info("Shutting down...");
  
  		if(!shuttingDown) {
  			synchronized (this) {
  				shuttingDown = true;
  				threadPoolExecutor.shutdown();
  			}
  
  			// stops jobs that have not yet started to be executed
  			for(Job job : jobStatus()) {
  				Runnable runningJob = job.runningJob();
  				if(runningJob != null) {
  					threadPoolExecutor.remove(runningJob);
  				}
  				job.status(JobStatus.DONE);
  			}
  			synchronized (launcherNotifier) {
  				launcherNotifier.set(false);
  				launcherNotifier.notify();
  			}
  		}
  
  		threadPoolExecutor.awaitTermination(timeout.toMillis(), TimeUnit.MILLISECONDS);
  	}
docs: Wait until the current running jobs are executed
  and cancel jobs that are planned to be executed.
  @param timeout The maximum time to wait
  @throws InterruptedException if the shutdown lasts more than 10 seconds