Class CronSchedule

    • Constructor Summary

      Constructors 
      Constructor Description
      CronSchedule​(java.lang.String cronExpression)  
      CronSchedule​(java.lang.String cronExpression, java.util.TimeZone timeZone)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long firstExecution()
      For a newly created job, what is the start time for the job.
      long nextExecution​(long previousExecution)
      Computes the next execution time for a job.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CronSchedule

        public CronSchedule​(java.lang.String cronExpression)
      • CronSchedule

        public CronSchedule​(java.lang.String cronExpression,
                            java.util.TimeZone timeZone)
    • Method Detail

      • firstExecution

        public long firstExecution()
        Description copied from interface: Schedule
        For a newly created job, what is the start time for the job. Often, the current clock time is returned, to start a job as soon as possible.
        Specified by:
        firstExecution in interface Schedule
        Returns:
        start time for new job, in system clock millis
      • nextExecution

        public long nextExecution​(long previousExecution)
        Description copied from interface: Schedule
        Computes the next execution time for a job.
        Specified by:
        nextExecution in interface Schedule
        Parameters:
        previousExecution - time of previous execution (in system clock millis)
        Returns:
        time of next execution (in system clock millis) or a value <= 0 to cancel the job's execution