Question

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().

Was it helpful?

Solution

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

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top