@Override
  public synchronized void startScheduler(Integer delay) throws AmbariException {
    try {
      if (!isInitialized) {
        initializeScheduler();
        isInitialized = true;
      }
    } catch (Exception e) {
      String msg = "Unable to initialize Request Execution scheduler !";
      LOG.warn(msg);
      e.printStackTrace();
      throw new AmbariException(msg);
    }
    try {
      if (!scheduler.isStarted()) {
        // To avoid issue created due to change in server clock in between the
        // scheduler initialization and scheduler start,
        // start immediately if no delay provided.
        if (delay != null) {
          scheduler.startDelayed(delay);
        } else {
          scheduler.start();
        }

      } else {
        LOG.info("Scheduler " + scheduler.getSchedulerInstanceId() +
          " already started. Skipping start.");
      }
    } catch (SchedulerException e) {
      LOG.error("Failed to start scheduler", e);
      throw new AmbariException(e.getMessage());
    }
  }
Constructor used for unit testing
@param configuration
ambari-server/src/main/java/org/apache/ambari/server/scheduler/ExecutionSchedulerImpl.java