Package org.quartz

Examples of org.quartz.Scheduler.start()


      //实例化
      QuartzFactory.me().sf = new StdSchedulerFactory(properties);
      //获取Scheduler
      Scheduler sched = QuartzFactory.me().sf.getScheduler();
      //内存,数据库的任务
      sched.start();
      //属性文件中的任务
      startPropertiesJobs();
      return true;
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here


                            new CronTrigger(name, "xplanner", name, "xplanner", fields[0]));
                    log.info("scheduled job: " + name);
                }
            }
        }
        jobScheduler.start();
    }

    public void destroy() {
    }
}
View Full Code Here

        ClassLoader classLoader = currThread.getContextClassLoader();
        InputStream propIs = classLoader.getResourceAsStream("quartz.properties");
          properties.load(propIs);
          stdSchedFact.initialize(properties);
          Scheduler sched = stdSchedFact.getScheduler();
          sched.start();
      } catch (Exception e) {
        SpagoBITracer.major(SpagoBIConstants.NAME_MODULE, this.getClass().getName(),
                        "init", "Error while initializing scheduler " + e);
      }
  }
View Full Code Here

      getLog().info("------- Starting Scheduler ----------------");

      // All of the jobs have been added to the scheduler, but none of the
      // jobs will run until the scheduler has been started
      sched.start();

      getLog().info("------- Started Scheduler -----------------");

      getLog().info("------- Waiting five minutes... ------------");
View Full Code Here

                .build();

        JobDetail jobDetail = JobBuilder.newJob(QuartzSchedulerMockJob.class).withIdentity("testCollectionPointJob", "testCollectionPointJobGroup").build();

        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();
View Full Code Here

    }
    Scheduler scheduler;
    try {
      scheduler = getScheduler();
      if(scheduler.isInStandbyMode()){
        scheduler.start();
      }else{
        scheduler.standby();
        scheduler.start();
      }
    } catch (SchedulerException e) {
View Full Code Here

      scheduler = getScheduler();
      if(scheduler.isInStandbyMode()){
        scheduler.start();
      }else{
        scheduler.standby();
        scheduler.start();
      }
    } catch (SchedulerException e) {
      throw new FixFlowException(e.getMessage(),e);
    }
  }
View Full Code Here

    }
    Scheduler scheduler;
    try {
      scheduler = getScheduler();
      if(scheduler.isInStandbyMode()){
        scheduler.start();
      }
    } catch (SchedulerException e) {
      throw new FixFlowException(e.getMessage(),e);
    }
  }
View Full Code Here

        sched.scheduleJob(job, trigger);
        log.info(job.getKey() + " will run at: " + runTime)

        // Start up the scheduler (nothing can actually run until the
        // scheduler has been started)
        sched.start();

        log.info("------- Started Scheduler -----------------");

        // wait long enough so that the scheduler as an opportunity to
        // run the job!
View Full Code Here

        log.info("------- Starting Scheduler ----------------");

        // All of the jobs have been added to the scheduler, but none of the
        // jobs
        // will run until the scheduler has been started
        sched.start();

        log.info("------- Started Scheduler -----------------");

        log.info("------- Waiting five minutes... ------------");
        try {
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.