Reputation: 27
I am running into an issue where quartz-service.xml (using quartz 1.8.6 with JBOSS 5.1.x) is deploying before the application that contains the class files to be run. Is there a way to delay the start of quartz?
My quartz-service.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<server>
<mbean code="org.quartz.ee.jmx.jboss.QuartzService" name="user:service=QuartzService,name=QuartzService">
<attribute name="JndiName">Quartz Scheduler</attribute>
<attribute name="Properties">
org.quartz.scheduler.instanceName = DefaultQuartzScheduler
org.quartz.scheduler.rmi.export = false
org.quartz.scheduler.rmi.proxy = false
org.quartz.scheduler.xaTransacted = false
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 5
org.quartz.threadPool.threadPriority = 4
org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin
org.quartz.plugin.jobInitializer.fileNames = D:/JBoss-5.1.0/quartz-config.xml
org.quartz.plugin.jobInitializer.failOnFileNotFound = true
org.quartz.plugin.jobInitializer.scanInterval = 120
org.quartz.plugin.jobInitializer.wrapInUserTransaction = false
</attribute>
</mbean>
</server>
Upvotes: 3
Views: 8266
Reputation: 1018
Below parameter can be used in Spring with Quartz Schedular maven dependency where you can specify start delay in milliseconds
<property name="startDelay" value="60000" />
Upvotes: 0
Reputation: 1696
In Spring, there is a property named startupDelay
, for example:
<property name="startupDelay" value="10"/>
In java, you can call the method startDelayed()
on the Scheduler instance, for example:
scheduler.startDelayed(10);
So you should find it out in JBOSS what the property is. Hope it helps.
Upvotes: 6