Class CronExpression


  • public class CronExpression
    extends Object
    Represent a CRON expression.
    • Constructor Detail

      • CronExpression

        public CronExpression​(String cron)
        Build a new instance.
        Parameters:
        cron - The CRON expression to parse
    • Method Detail

      • getNextDelayMilliseconds

        public long getNextDelayMilliseconds​(ZoneId zoneId)
        Retrieves the delay from now to the next match.
        Parameters:
        zoneId - The Zone to use for manipulating datetime
        Returns:
        The next delay in milliseconds
      • getNextDelayMilliseconds

        protected long getNextDelayMilliseconds​(LocalDateTime from)
        Retrieves the delay from given datetime to the next match.
        Parameters:
        from - The datetime
        Returns:
        The next delay in milliseconds