Frage

I need some assistance in implementing a scheduler which runs parallel with the other processing. I found quartz scheduler for many of my searches on the web. But, I need something which is inbuilt and can run concurrently with other processes and not any external libraries

I checked with scheduleAtFixedRate. But, this has not option for parallel execution.

Can anyone please suggest in this regard?? My requirement is that, a java function has to run at every fixed intervals soon after the server starts. This will be known by the servlet start and I will have to initiate the scheduler in the init().

War es hilfreich?

Lösung

My requirement is that, a java function has to run at every fixed intervals soon after the server starts

Andere Tipps

I suggest you to define a ServletContextListener, and to start a Quartz scheduler from its contextInitialized method.

contextInitialized is called on application deployment/reload on your application server, thus your scheduler can be initialized soon after the server starts.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top