Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About @Schedule and increments

 
Himai Minh
Ranch Hand
Posts: 1229
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Saloon Keeper
Pie
Posts: 2270
76
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you are right that is a mistake in the book.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic