Class QuartzUtils


  • public class QuartzUtils
    extends Object
    Provided Quartz scheduler utility methods.
    Since:
    4.3.7
    • Constructor Detail

      • QuartzUtils

        public QuartzUtils()
    • Method Detail

      • scheduleSimpleJob

        public static Date scheduleSimpleJob​(org.quartz.Scheduler scheduler,
                                             org.quartz.JobDetail jobDetail,
                                             long repeatInterval)
        Schedule a simple job to start immediately and repeat forever.
        Parameters:
        scheduler - the quartz scheduler (required)
        jobDetail - job details (required)
        repeatInterval - the repeat interval
        Returns:
        the schedule date
      • scheduleSimpleJob

        public static Date scheduleSimpleJob​(org.quartz.Scheduler scheduler,
                                             org.quartz.JobDetail jobDetail,
                                             Date startDate,
                                             Date endDate,
                                             int repeatCount,
                                             long repeatInterval)
        Schedule a simple job
        Parameters:
        scheduler - the quartz scheduler (required)
        jobDetail - job details (required)
        startDate - start date of the job
        endDate - end date of the job
        repeatCount - the repeat count
        repeatInterval - the repeat interval
        Returns:
        the schedule date
      • scheduleCronJob

        public static Date scheduleCronJob​(org.quartz.Scheduler scheduler,
                                           org.quartz.JobDetail jobDetail,
                                           String cronExpression)
        Schedule a schedule cron job to start immedately.
        Parameters:
        scheduler - the quartz scheduler (required)
        jobDetail - job details (required)
        cronExpression - the cron expression for this cron job (required)
        Returns:
        the schedule date
      • scheduleCronJob

        public static Date scheduleCronJob​(org.quartz.Scheduler scheduler,
                                           org.quartz.JobDetail jobDetail,
                                           Date startDate,
                                           Date endDate,
                                           String cronExpression)
        Perform a schedule cron job
        Parameters:
        scheduler - the quartz scheduler (required)
        jobDetail - job details (required)
        startDate - start date of the job
        endDate - end date of the job
        cronExpression - the cron expression for this cron job (required)
        Returns:
        the schedule date