When I tried the tutorial to create timer service using EJB this morning, I found out the @Schedule annotation for second does not work as what it suppose to be (print a message every second), keep trying …. trying…..
End up, the “reason” give me a BIG Ooooooooooo …..
What I did
@Singleton public class ScheduleBean { @Schedule(second = "*/1") public void doWork() { System.out.println("Hello dude... schedule is working..."); } }
What it suppose to be
@Singleton public class ScheduleBean { @Schedule(second = "*/1", minute = "*", hour = "*") public void doWork() { System.out.println("Hello dude... schedule is working..."); } }