@Test public void check_second_increment() throws Exception { assertThat(new CronExpression("5/15 * * * * *").nextTimeAfter(new DateTime(2012, 4, 10, 13, 00))).isEqualTo(new DateTime(2012, 4, 10, 13, 00, 05)); assertThat(new CronExpression("5/15 * * * * *").nextTimeAfter(new DateTime(2012, 4, 10, 13, 00, 05))).isEqualTo(new DateTime(2012, 4, 10, 13, 00, 20)); assertThat(new CronExpression("5/15 * * * * *").nextTimeAfter(new DateTime(2012, 4, 10, 13, 00, 20))).isEqualTo(new DateTime(2012, 4, 10, 13, 00, 35)); assertThat(new CronExpression("5/15 * * * * *").nextTimeAfter(new DateTime(2012, 4, 10, 13, 00, 35))).isEqualTo(new DateTime(2012, 4, 10, 13, 00, 50)); assertThat(new CronExpression("5/15 * * * * *").nextTimeAfter(new DateTime(2012, 4, 10, 13, 00, 50))).isEqualTo(new DateTime(2012, 4, 10, 13, 01, 05)); assertThat(new CronExpression("10/100 * * * * *").nextTimeAfter(new DateTime(2012, 4, 10, 13, 00, 50))) .isEqualTo(new DateTime(2012, 4, 10, 13, 01, 10)); assertThat(new CronExpression("10/100 * * * * *").nextTimeAfter(new DateTime(2012, 4, 10, 13, 01, 10))) .isEqualTo(new DateTime(2012, 4, 10, 13, 02, 10)); }
public DateTime nextTimeAfter(DateTime afterTime) { return nextTimeAfter(afterTime, afterTime.plusYears(4)); }
CronExpression { public DateTime nextTimeAfter(DateTime afterTime) { return nextTimeAfter(afterTime, afterTime.plusYears(4)); } }
CronExpression { public DateTime nextTimeAfter(DateTime afterTime) { return nextTimeAfter(afterTime, afterTime.plusYears(4)); } CronExpression(final String expr);  CronExpression(final String expr, final boolean withSeconds); }
CronExpression { public DateTime nextTimeAfter(DateTime afterTime) { return nextTimeAfter(afterTime, afterTime.plusYears(4)); } CronExpression(final String expr);  CronExpression(final String expr, final boolean withSeconds); static CronExpression create(final String expr); static CronExpression createWithoutSeconds(final String expr); DateTime nextTimeAfter(DateTime afterTime); DateTime nextTimeAfter(DateTime afterTime, long durationInMillis); DateTime nextTimeAfter(DateTime afterTime, DateTime dateTimeBarrier); @Override String toString(); }
CronExpression { public DateTime nextTimeAfter(DateTime afterTime) { return nextTimeAfter(afterTime, afterTime.plusYears(4)); } CronExpression(final String expr);  CronExpression(final String expr, final boolean withSeconds); static CronExpression create(final String expr); static CronExpression createWithoutSeconds(final String expr); DateTime nextTimeAfter(DateTime afterTime); DateTime nextTimeAfter(DateTime afterTime, long durationInMillis); DateTime nextTimeAfter(DateTime afterTime, DateTime dateTimeBarrier); @Override String toString();  }