core/play-java/src/main/java/play/libs/Time.java
public static long cronInterval(String cron, Date date) {
    try {
      return new CronExpression(cron).getNextInterval(date);
    } catch (Exception e) {
      throw new IllegalArgumentException("Invalid CRON pattern : " + cron, e);
    }
  }
public static long cronInterval(String cron, Date date) {
    try {
      return new CronExpression(cron).getNextInterval(date);
    } catch (Exception e) {
      throw new IllegalArgumentException("Invalid CRON pattern : " + cron, e);
    }
  }
Compute the number of milliseconds between the next valid date and the one after.

@param cron the CRON String
@param date the date to start search
@return the number of milliseconds between the next valid date and the one after, with an
invalid interval between