Skip to content

Instantly share code, notes, and snippets.

@finnjohnsen
Last active December 12, 2018 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save finnjohnsen/01e6194f61acc9da8743b24163d0be96 to your computer and use it in GitHub Desktop.
Save finnjohnsen/01e6194f61acc9da8743b24163d0be96 to your computer and use it in GitHub Desktop.
test cron expression
@Test
public void testCronExpression() throws Exception {
CronExpression ce = new CronExpression("0 0 0 * * ?");
Date next = new Date();
for (int count = 0; count <= 20; count++) {
next = ce.getNextValidTimeAfter(next);
System.out.println(next);
}
assert true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment