Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. import org.springframework.scheduling.support.CronSequenceGenerator;
  2.  
  3. import java.time.Instant;
  4. import java.util.Date;
  5.  
  6. public class Main {
  7. public static void main(String[] args) {
  8. CronSequenceGenerator generator = new CronSequenceGenerator("0 0 * * * *");
  9. Date now = Date.from(Instant.now());
  10. for (int i = 0 ; i < 5; i++) {
  11. System.out.println(generator.next(now));
  12. now = generator.next(now);
  13. }
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement