Reputation: 8322
i am using spring annotaions with <task:annotation-driven/>
@Scheduled(fixedDelay=100)
public void shout(){
System.out.println("hello");
}
this is printing only 9 times, but i want it to print infinitely.
Upvotes: 0
Views: 835
Reputation: 120881
As far as I understand you and the behavior, then the problem seams to be that the containing Application, Test, whatever just ends.
A Spring Scheduler does not hold the application open. If the spring context ends, because the application ends, then the timer also stops.
Upvotes: 1