@ConditionalOnBean(DataSource.class)
  @ConditionalOnMissingBean
  @DependsOnDatabaseInitialization
  @Bean(destroyMethod = "stop")
  public Scheduler scheduler(DbSchedulerCustomizer customizer, StatsRegistry registry) {
    log.info("Creating db-scheduler using tasks from Spring context: {}", configuredTasks);

    // Ensure that we are using a transactional aware data source
    DataSource transactionalDataSource =
        configureDataSource(customizer.dataSource().orElse(existingDataSource));

    // Instantiate a new builder
    final SchedulerBuilder builder =
        Scheduler.create(transactionalDataSource, nonStartupTasks(configuredTasks));

    builder.threads(config.getThreads());

    // Polling
    builder.pollingInterval(config.getPollingInterval());

    // Polling strategy
    if (config.getPollingStrategy() == PollingStrategyConfig.Type.FETCH) {
      builder.pollUsingFetchAndLockOnExecute(
          config.getPollingStrategyLowerLimitFractionOfThreads(),
          config.getPollingStrategyUpperLimitFractionOfThreads());
    } else if (config.getPollingStrategy() == PollingStrategyConfig.Type.LOCK_AND_FETCH) {
      builder.pollUsingLockAndFetch(
          config.getPollingStrategyLowerLimitFractionOfThreads(),
          config.getPollingStrategyUpperLimitFractionOfThreads());
    } else {
      throw new IllegalArgumentException(
          "Unknown polling-strategy: " + config.getPollingStrategy());
    }

    builder.heartbeatInterval(config.getHeartbeatInterval());

    builder.missedHeartbeatsLimit(config.getMissedHeartbeatsLimit());

    // Use scheduler name implementation from customizer if available, otherwise use
    // configured scheduler name (String). If both is absent, use the library default
    if (customizer.schedulerName().isPresent()) {
      builder.schedulerName(customizer.schedulerName().get());
    } else if (config.getSchedulerName() != null) {
      builder.schedulerName(new SchedulerName.Fixed(config.getSchedulerName()));
    }

    builder.tableName(config.getTableName());

    // Use custom serializer if provided. Otherwise use devtools friendly serializer.
    builder.serializer(customizer.serializer().orElse(SPRING_JAVA_SERIALIZER));

    // Use custom JdbcCustomizer if provided.
    customizer.jdbcCustomization().ifPresent(builder::jdbcCustomization);

    if (config.isAlwaysPersistTimestampInUtc()) {
      builder.alwaysPersistTimestampInUTC();
    }

    if (config.isImmediateExecutionEnabled()) {
      builder.enableImmediateExecution();
    }

    if (config.isPriorityEnabled()) {
      builder.enablePriority();
    }

    // Use custom executor service if provided
    customizer.executorService().ifPresent(builder::executorService);

    // Use custom due executor if provided
    customizer.dueExecutor().ifPresent(builder::dueExecutor);

    // Use housekeeper executor service if provided
    customizer.housekeeperExecutor().ifPresent(builder::housekeeperExecutor);

    builder.deleteUnresolvedAfter(config.getDeleteUnresolvedAfter());

    // Add recurring jobs and jobs that implements OnStartup
    builder.startTasks(startupTasks(configuredTasks));

    // Expose metrics
    builder.statsRegistry(registry);

    // Failure logging
    builder.failureLogging(config.getFailureLoggerLevel(), config.isFailureLoggerLogStackTrace());

    // Shutdown max wait
    builder.shutdownMaxWait(config.getShutdownMaxWait());

    // Register listeners
    schedulerListeners.forEach(builder::addSchedulerListener);

    // Register interceptors
    executionInterceptors.forEach(builder::addExecutionInterceptor);

    return builder.build();
  }
Will typically be created if Spring Boot Actuator is not on the classpath.
db-scheduler-boot-starter/src/main/java/com/github/kagkarlsson/scheduler/boot/autoconfigure/DbSchedulerAutoConfiguration.java