Starts the scheduler.
<p>
Invoked by iPojo.
</p>
17152
public void start() throws Exception {
		this.logger.info( "Roboconf's scheduler is starting..." );

		// Verify the "scheduler" directory exists
		File schedulerDirectory = getSchedulerDirectory();
		Utils.createDirectory( schedulerDirectory );

		// Disable Quartz update checks
		StringBuilder quartzProperties = new StringBuilder();
		quartzProperties.append( "org.quartz.scheduler.instanceName: Roboconf Quartz Scheduler\n" );
		quartzProperties.append( "org.quartz.threadPool.threadCount = 3\n" );
		quartzProperties.append( "org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore\n" );
		quartzProperties.append( "org.quartz.scheduler.skipUpdateCheck: false\n" );

		StdSchedulerFactory factory = new StdSchedulerFactory();
		factory.initialize( new ByteArrayInputStream( quartzProperties.toString().getBytes( StandardCharsets.UTF_8 )));

		// Create a new scheduler
		this.scheduler = factory.getScheduler();
		this.scheduler.start();
		this.scheduler.getContext().put( MANAGER, this.manager );

		// Add a listener to the DM
		this.dmListener = new ManagerListener( this );
		this.manager.listenerAppears( this.dmListener );

		// Reload all the jobs
		loadJobs();
	}
1167937
public void run() {
        int emptyCount = 0;
        long scheduleTickTime = System.nanoTime();
        boolean isShutDown = false;
        activeDispatchers.incrementAndGet();
        try {
            while( ! isShutDown ) {
                try {
                    if ( pollQs() ) {
                        emptyCount = 0;
                        if ( System.nanoTime() - scheduleTickTime > SCHEDULE_TICK_NANOS) {
                            if ( emptySinceLastCheck == 0 ) // no idle during last interval
                            {
                                checkForSplit();
                            }
                            emptySinceLastCheck = 0;
                            scheduleTickTime = System.nanoTime();
                            schedulePendingAdds();
                        }
                    }
                    else {
                        emptyCount++;
                        emptySinceLastCheck++;
                        scheduler.pollDelay(emptyCount);
                        if (shutDown) // access volatile only when idle
                            isShutDown = true;
                        if ( scheduler.getBackoffStrategy().isSleeping(emptyCount) ) {
                            scheduleTickTime = 0;
                            schedulePendingAdds();
                            if ( System.currentTimeMillis()-created > 5000 ) {
                                if ( autoShutDown && actors.length == 0 && toAdd.peek() == null) {
                                    shutDown();
                                } else {
                                    scheduler.tryStopThread(this);
                                }
                            }
                        }
                    }
                } catch (Throwable th) {
                    Log.Warn(this, th, "from main poll loop");
                }
            }
            scheduler.threadStopped(this);
            LockSupport.parkNanos(1000*1000*1000);
            if ( actors.length > 0 || toAdd.peek() != null ) {
                if ( SimpleScheduler.DEBUG_SCHEDULING)
                    Log.Lg.warn(this, "zombie dispatcher thread detected. This can be a debugging artifact.");
                scheduler.tryStopThread(this);
            }
            if ( SimpleScheduler.DEBUG_SCHEDULING)
                Log.Debug(this,"dispatcher thread terminated "+getName());
        } finally {
            activeDispatchers.decrementAndGet();
        }
    }
1164943
@PostConstruct
    public void start() throws Exception {
        lifecycleLock.writeLock().lock();
        try {
            if (!State.STOPPED.equals(state)) {
                logger.warn("Ignore start() command for {} instance", state);
                return;
            }
            logger.info("Start...");

            for (Query query : queries) {
                query.start();
            }
            for (OutputWriter outputWriter : outputWriters) {
                outputWriter.start();
            }

            collectScheduledExecutor = Executors.newScheduledThreadPool(getNumQueryThreads(), new NamedThreadFactory("jmxtrans-collect-", true));
            exportScheduledExecutor = Executors.newScheduledThreadPool(getNumExportThreads(), new NamedThreadFactory("jmxtrans-export-", true));

            logger.info("Start queries and output writers...");
            for (final Query query : getQueries()) {
                collectScheduledExecutor.scheduleWithFixedDelay(new Runnable() {
                    @Override
                    public void run() {
                        lifecycleLock.readLock().lock();
                        try {
                            if (!State.STARTED.equals(state)) {
                                logger.debug("Ignore query.collectMetrics() command for {} instance", state);
                                return;
                            }
                            query.collectMetrics();
                        } finally {
                            lifecycleLock.readLock().unlock();
                        }
                    }

                    @Override
                    public String toString() {
                        return "Collector[" + query + "]";
                    }
                }, 0, getQueryIntervalInSeconds(), TimeUnit.SECONDS);

                // start export just after first collect
                exportScheduledExecutor.scheduleWithFixedDelay(new Runnable() {
                    @Override
                    public void run() {
                        lifecycleLock.readLock().lock();
                        try {
                            if (!State.STARTED.equals(state)) {
                                logger.debug("Ignore query.exportCollectedMetrics() command for {} instance", state);
                                return;
                            }

                            query.exportCollectedMetrics();
                        } finally {
                            lifecycleLock.readLock().unlock();
                        }
                    }

                    @Override
                    public String toString() {
                        return "Exporter[" + query + "]";
                    }
                }, getQueryIntervalInSeconds() + 1, getExportIntervalInSeconds(), TimeUnit.SECONDS);
            }

            shutdownHook = new EmbeddedJmxTransShutdownHook();
            shutdownHook.registerToRuntime();
            state = State.STARTED;
            logger.info("EmbeddedJmxTrans started");
        } catch (RuntimeException e) {
            this.state = State.ERROR;
            if (logger.isDebugEnabled()) {
                // to troubleshoot JMX call errors or equivalent, it may be useful to log and rethrow
                logger.warn("Exception starting EmbeddedJmxTrans", e);
            }
            throw e;
        } finally {
            lifecycleLock.writeLock().unlock();
        }
    }
39032
@Scheduled(initialDelayString = PROP_AUTO_CLEANUP_INTERVAL, fixedDelayString = PROP_AUTO_CLEANUP_INTERVAL)
    public void run() {
        LOGGER.debug("Auto cleanup scheduler has been triggered.");
        // run this code in system code privileged to have the necessary
        // permission to query and create entities
        if (!cleanupTasks.isEmpty()) {
            systemSecurityContext.runAsSystem(this::executeAutoCleanup);
        }
    }
591034
@Override
	public void start() throws Exception {
		synchronized (lock) {
			if (jobExecutorService == null) {
				// create the embedded runtime
				jobExecutorServiceConfiguration = createConfiguration();

				// start it up
				jobExecutorService = createJobExecutorService(jobExecutorServiceConfiguration);
			} else {
				throw new IllegalStateException("The local executor was already started.");
			}
		}
	}
148699
synchronized void start(long initialDelay, long period, TimeUnit unit, Runnable runnable) {
        if (this.scheduledFuture != null) {
            throw new IllegalArgumentException("Reporter already started");
        }

        this.scheduledFuture = executor.scheduleAtFixedRate(runnable, initialDelay, period, unit);
    }
600069
@Override
    public void run() {
        // Check for a pending exception.  A CancellationException could be set if a cancel() was driven while this Runnable
        // was being re-scheduled.
        if (this.m_pendingException != null) {
            return;
        }

        // NOTE: Already running in Default Executor thread.
        try {
            this.m_runnable.run();
        } catch (Exception e) {
            this.m_pendingException = new ExecutionException(e);
            this.m_coordinationLatch.countDown();
            return;
        }

        try {
            long scheduleTime = this.m_periodInterval;
            if (!this.m_scheduledWithDelay) {
                this.m_myNextExecutionTime = this.m_myNextExecutionTime + this.m_periodInterval;
                long currentTime = System.nanoTime();

                scheduleTime = (this.m_myNextExecutionTime > currentTime) ? (this.m_myNextExecutionTime - currentTime) : 0;
            }

            m_schedFuture = this.m_scheduledExecutor.schedule(this, scheduleTime, TimeUnit.NANOSECONDS);
        } catch (Exception e) {
            this.m_pendingException = e;
            this.m_coordinationLatch.countDown();
        }
    }
136360
public void start () throws SchedulerException
  {

    if (m_bShuttingDown || m_bClosed)
    {
      throw new SchedulerException ("The Scheduler cannot be restarted after shutdown() has been called.");
    }

    // QTZ-212 : calling new schedulerStarting() method on the listeners
    // right after entering start()
    notifySchedulerListenersStarting ();

    if (m_aInitialStart == null)
    {
      m_aInitialStart = new Date ();
      m_aResources.getJobStore ().schedulerStarted ();
      _startPlugins ();
    }
    else
    {
      m_aResources.getJobStore ().schedulerResumed ();
    }

    m_aSchedThread.togglePause (false);

    LOGGER.info ("Scheduler " + m_aResources.getUniqueIdentifier () + " started.");

    notifySchedulerListenersStarted ();
  }
42426
@PostConstruct
    public void start() {
        threadFactory = Executors.defaultThreadFactory();
        disruptor = new Disruptor<>(Registration.FACTORY,
                ringSize,
                threadFactory,
                ProducerType.MULTI,
                new BlockingWaitStrategy());
        disruptor.handleEventsWith(new ContainerEventHandler());
        ringBuffer = disruptor.start();
    }
927801
@Override
    public void start() {
        rotationTimer = new Timer(true);
        TimerTask task = new TimerTask() {
            @Override
            public void run() {
                rotationTimerTriggered.set(true);
            }
        };
        rotationTimer.scheduleAtFixedRate(task, interval, interval);
    }
814207
public void start() throws Throwable
   {
      if (!isExternal)
      {
         executorService = Executors.newSingleThreadExecutor(new IdleThreadFactory());
      }

      shutdown.set(false);
      interval = Long.MAX_VALUE;
      next = Long.MAX_VALUE;

      executorService.execute(new IdleConnectionRemoverRunner());
   }
1019636
public void initialize (final String pname,
                          final IScheduler scheduler,
                          final IClassLoadHelper classLoadHelper) throws SchedulerException
  {
    m_sName = pname;
    scheduler.getListenerManager ().addJobListener (this, EverythingMatcher.allJobs ());
  }
1130404
public void start() // F73234
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "start");

        ivScheduledFuture = ivDeferrableScheduledExecutorService.schedule(this,
                                                                          ivSweepInterval,
                                                                          TimeUnit.MILLISECONDS); // F73234

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "start");
    }
358319
@Override
    public void run() {
        final ScheduledFuture<?> future = this.executor.scheduleWithFixedDelay(this.scheduled, 0, this.delayMillis,
                TimeUnit.MILLISECONDS);
        try {
            this.runTrigger.await();
        } catch (final InterruptedException e) {
            this.listener.handle(e);
        } finally {
            future.cancel(true); // stop the periodic reading
            this.scheduled.cleanup();
            this.executor.shutdownNow();
            this.listener.destroy();
        }
    }
629632
@Override
    public void start(final Infrastructure infra) {
        try {
            final OutputQuartzHelper outputQuartzHelper = new OutputQuartzHelper();
            final JobDetail jobDetail = outputQuartzHelper.getJobDetail(outputInvoker);
            final Trigger trigger = outputQuartzHelper.getCronTrigger(cronExpression);
            scheduler = StdSchedulerFactory.getDefaultScheduler();
            scheduler.scheduleJob(jobDetail, trigger);
            scheduler.start();
        } catch (final SchedulerException se) {
            LOGGER.error("Error occurred while starting the cron scheduler : " + se.getMessage(), se);
        }
    }
1233854
public synchronized void start() {
    if (!_started.get()) {
      _executorService = new ScheduledThreadPoolExecutor(1,
          ExecutorsUtils.newThreadFactory(Optional.of(LoggerFactory.getLogger(FineGrainedWatermarkTracker.class))));
      _executorService.scheduleAtFixedRate(_sweeper, 0, _sweepIntervalMillis, TimeUnit.MILLISECONDS);
      _executorService.scheduleAtFixedRate(_stabilityChecker, 0, _stabilityCheckIntervalMillis, TimeUnit.MILLISECONDS);
    }
    _started.set(true);
  }
877245
public void start() {
        if(actionInBackground != null) {

            Runnable jobToRun = new Runnable() {
                @Override
                public void run() {
                    result = (JobResult) actionInBackground.doAsync();
                    onResult();
                }
            };

            if(getExecutorService() != null) {
               asyncFutureTask = (FutureTask) getExecutorService().submit(jobToRun);
            } else {
                asyncThread = new Thread(jobToRun);
                asyncThread.start();
            }
        }
    }