zhibing.pu
2024-07-25 79fc712ed025069c1d21de230bdc95c74910288c
DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/quartz/QuartzUtil.java
@@ -30,12 +30,16 @@
    * @param propertiesStream 配置文件流
    * @return
    */
   public static void start(InputStream propertiesStream) throws SchedulerException {
   public static void start(InputStream propertiesStream){
      if(null == scheduler){
         scheduler = SchedulerUtil.getScheduler(propertiesStream);
      }
      scheduler.start();
      log.info(QuartzEnum.SCHEDULER_START_SUCCESS.getValue());
      try {
         scheduler.start();
         log.info(QuartzEnum.SCHEDULER_START_SUCCESS.getValue());
      } catch (SchedulerException e) {
         e.printStackTrace();
      }
   }
   
   
@@ -191,7 +195,7 @@
   private static JobDetail getJobDetail(Job job, String job_name, String group_name, JobDataMap jobDataMap){
      JobDetail jobDetail = JobBuilder.newJob(job.getClass())
            .withIdentity(job_name, group_name)
            .usingJobData(jobDataMap)
            .setJobData(jobDataMap)
            .build();
      return jobDetail;
   }