Class QuartzUtil

java.lang.Object
org.summerboot.jexpress.integration.quartz.QuartzUtil

public class QuartzUtil extends Object
Author:
Changski Tie Zheng Zhang 张铁铮, 魏泽北, 杜旺财, 杜富贵
  • Field Details

    • log

      protected static final org.apache.logging.log4j.Logger log
    • DEFAULT_DST_Transition_INFO

      public static final TimeUtil.ZoneOffsetTransitionInfo DEFAULT_DST_Transition_INFO
    • QUARTZ_WEEKDAY_MAP

      public static final Map<Integer,String> QUARTZ_WEEKDAY_MAP
  • Constructor Details

    • QuartzUtil

      public QuartzUtil()
  • Method Details

    • addQuartzJob

      public static int addQuartzJob(org.quartz.Scheduler scheduler, Class<? extends org.quartz.Job> jobClass) throws org.quartz.SchedulerException
      Parameters:
      scheduler -
      jobClass -
      Returns:
      number of triggers created
      Throws:
      org.quartz.SchedulerException
    • addQuartzJob

      public static int addQuartzJob(org.quartz.Scheduler scheduler, Class<? extends org.quartz.Job> jobClass, int[] daysOfMonth, int[] daysOfWeek, Integer hour, Integer minute, Integer second, Long fixedRateMs, Long fixedDelayMs, Long initialDelayMs, String... cronExpressions) throws org.quartz.SchedulerException
      Parameters:
      scheduler -
      jobClass -
      daysOfMonth - 1-31
      daysOfWeek - 1-7 for SUN-SAT
      hour - 0-23
      minute - 0-59
      second - 0-59
      fixedRateMs - The fixedRateMs runs the scheduled task at every n millisecond
      fixedDelayMs - The fixedDelayMs makes sure that there is a delay of n millisecond between the finish time of an execution of a task and the start time of the next execution of the task
      initialDelayMs - start job after n millisecond
      cronExpressions -
      Returns:
      number of triggers created
      Throws:
      org.quartz.SchedulerException
    • trim

      protected static int trim(Integer hour_minute)
    • addQuartzJob

      public static int addQuartzJob(org.quartz.Scheduler scheduler, org.quartz.JobDetail jobDetail, int[] daysOfMonth, int[] daysOfWeek, Integer hour, Integer minute, Integer second, Long fixedRateMs, Long fixedDelayMs, Long initialDelayMs, String... cronExpressions) throws org.quartz.SchedulerException
      Parameters:
      scheduler -
      jobDetail -
      daysOfMonth - 1-31
      daysOfWeek - 1-7 for SUN-SAT
      hour - 0-23
      minute - 0-59
      second - 0-59
      fixedRateMs - The fixedRateMs runs the scheduled task at every n millisecond
      fixedDelayMs - The fixedDelayMs makes sure that there is a delay of n millisecond between the finish time of an execution of a task and the start time of the next execution of the task
      initialDelayMs - start job after n millisecond
      cronExpressions -
      Returns:
      number of triggers created
      Throws:
      org.quartz.SchedulerException
    • getNextFireTimes

      public static List<Date> getNextFireTimes(org.quartz.Scheduler scheduler, StringBuilder sb) throws org.quartz.SchedulerException
      Throws:
      org.quartz.SchedulerException