Package org.quartz

Examples of org.quartz.Scheduler.shutdown()


    SchedulerContext schedulerContext = new SchedulerContext();
    scheduler.getContext();
    schedulerControl.setReturnValue(schedulerContext, 4);
    scheduler.start();
    schedulerControl.setVoidCallable();
    scheduler.shutdown(false);
    schedulerControl.setVoidCallable();
    schedulerControl.replay();

    SchedulerFactoryBean schedulerFactoryBean = new SchedulerFactoryBean() {
      protected Scheduler createScheduler(SchedulerFactory schedulerFactory, String schedulerName) {
View Full Code Here


                    {
                        try
                        {
                            if ( ! newSched.isShutdown() )
                            {
                                newSched.shutdown();
                            }
                        }
                        catch (SchedulerException e)
                        {
                            e.printStackTrace();
View Full Code Here

      SpagoBITracer.critical("SPAGOBI", this.getClass().getName(), "contextDestroyed",
          "Error while retrieving scheduler", e);
    }
    if (scheduler != null) {
      try {
        scheduler.shutdown();
      } catch (SchedulerException e) {
        SpagoBITracer.critical("SPAGOBI", this.getClass().getName(), "contextDestroyed",
            "Error while stopping scheduler", e);
      }
    }
View Full Code Here

      Thread.sleep(10L * 500L);
      // executing...

      getLog().info("------- Shutting Down ---------------------");

      sched.shutdown(true);

      getLog().info("------- Shutdown Complete -----------------");

      SchedulerMetaData metaData = sched.getMetaData();
      getLog().info("Executed " + metaData.numJobsExecuted() + " jobs.");
View Full Code Here

        sched.scheduleJob(jobDetail, trigger);
        sched.start();
        // let the program have an opportunity to run the job
        assertTrue("No signal from job", SIGNALLER.tryAcquire(5L, TimeUnit.SECONDS));
        sched.shutdown(true);

        Operation op = getLastEntered();
        assertNotNull("No operation extracted", op);
        assertEquals("Mismatched type", QuartzSchedulerDefinitions.TYPE, op.getType());
View Full Code Here

        } catch (Exception e) {
        }

        // shut down the scheduler
        log.info("------- Shutting Down ---------------------");
        sched.shutdown(true);
        log.info("------- Shutdown Complete -----------------");
    }

    public static void main(String[] args) throws Exception {
View Full Code Here

        } catch (Exception e) {
        }

        log.info("------- Shutting Down ---------------------");

        sched.shutdown(true);

        log.info("------- Shutdown Complete -----------------");

        SchedulerMetaData metaData = sched.getMetaData();
        log.info("Executed " + metaData.getNumberOfJobsExecuted() + " jobs.");
View Full Code Here

    Calendar cal = Calendar.getInstance();
    cal.add(Calendar.HOUR_OF_DAY, +24);
    System.out.println("Calendar:" + cal.get(Calendar.HOUR_OF_DAY));

    scheduler.shutdown();

    assertTrue(true);
  }

}
View Full Code Here

        log.info("Stop QuartzService(" + jndiName + ")...");

        try {
            Scheduler scheduler = schedulerFactory.getScheduler();

            scheduler.shutdown();
        } catch (Exception e) {
            log.error("Failed to shutdown Scheduler", e);

            throw new SchedulerConfigException(
                    "Failed to shutdown Scheduler - ", e);
View Full Code Here

        this.enabled = false;

        if (schedulerImplicitlyCreated) {
            try {
                scheduler.shutdown();
            } catch (SchedulerException e) {
                if (log.isWarnEnabled()) {
                    log.warn("Unable to cleanly shutdown implicitly created Quartz Scheduler instance.", e);
                }
            } finally {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.