File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes About @Schedule and increments Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "About @Schedule and increments" Watch "About @Schedule and increments" New topic
Author

About @Schedule and increments

Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 758
On p.207 of EJB in Action(2nd edition),

@Schedule (second="30/10", minute="*/20",hour="*/6")

starting the timer at midnight would result in it firing at 06:20:40, 06:40:30, 12:20:40. 12:40:30 and so on...


I think what the schedule means is for every 6 hours , within every hour, fire the timer every 20 minutes and 30,40,50 second.

I think the timer should be fired from midnight :
0:0:0 , 0:20: 30. 0:20:40, 0:20:50 , 0:40: 30, 0:40:40, 0:40:50 6:20:30, 6:20:40 , 6:20:50. 6:40:30, 6:40:40, 6:40:50. 12:20:30, 12:20:40. 12:20:50, 12:40:30, 12:40:40, 12:40:50 and so on.
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1675
    
  25

Yes, you are right that is a mistake in the book.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About @Schedule and increments