code: public final void setScheduledExecutor(ScheduledExecutorService scheduledExecutor) {
          if (scheduledExecutor != null) {
              this.scheduledExecutor = scheduledExecutor;
              this.enterpriseConcurrentScheduler = managedScheduledExecutorServiceClass != null && managedScheduledExecutorServiceClass
                      .isInstance(scheduledExecutor);
          } else {
              this.scheduledExecutor = Executors.newSingleThreadScheduledExecutor();
              this.enterpriseConcurrentScheduler = false;
          }
      }
docs: Specify the {@link java.util.concurrent.ScheduledExecutorService} to
  delegate to.
  <p>
  Autodetects a JSR-236
  
  @param scheduledExecutor
  the new scheduled executor
  {@link javax.enterprise.concurrent.ManagedScheduledExecutorService}
  in order to use it for trigger-based scheduling if possible,
  instead of Spring's local trigger management.
  <p>
  Note: This will only apply to {@link TaskScheduler}
  invocations. If you want the given executor to apply to
  {@link org.springframework.scheduling.SchedulingTaskExecutor}
  invocations as well, pass the same executor reference to
  {@link #setConcurrentExecutor}.
  @see #setConcurrentExecutor