Sunday, September 24, 2017

How to delay Quartz Scheduler startup in a web application

Quartz scheduler startup can be delayed by configuration in web.xml or programmatically.

1. Configuration in web.xml
<context-param>
<param-name>quartz:start-delay-seconds</param-name>
<param-value>DELAY_IN_SECONDS</param-value>
</context-param>

2. Programmatically
    scheduler.startDelayed(DELAY_IN_SECONDS);


Done!!

LinkWithin

Related Posts Plugin for WordPress, Blogger...