Examples of nextExecutionTime()


Examples of org.springframework.scheduling.support.CronTrigger.nextExecutionTime()

    Date lastCompletionTime = cal.getTime();
    TriggerContext triggerContext = new SimpleTriggerContext(
        lastScheduledExecutionTime, lastActualExecutionTime, lastCompletionTime);
    cal.add(Calendar.MINUTE, 30);
    cal.add(Calendar.HOUR_OF_DAY, 1); // 6:00
    Date nextExecutionTime = cronTrigger.nextExecutionTime(triggerContext);
    assertEquals(cal.getTime(), nextExecutionTime); // assert that 6:00 is next execution time
    Thread.sleep(10000);
  }

  @Test(expected = BeanCreationException.class)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.