[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Jobs not executing - sometimes  XML
Forum Index -> Quartz
Author Message
gplummer

neo

Joined: 12/10/2009 15:55:32
Messages: 6
Offline

I'm seeing some strange behavior with the Quartz scheduler. My job is being created and written correctly to the database (QRTZ_JOB_DETAILS). The row remains there for a short time, then it disappears, but the job doesn't run (nothing is showing up in the log, but no errors in the log or console either). This seems to be random as sometimes the job executes fine. Has anyone seen this behavior before? Any advice/ideas would be appreciated. Thanks in advance!

Greg
jhouse

seraphim
[Avatar]
Joined: 11/06/2009 15:29:56
Messages: 1703
Offline


As published several times in documentation, there are NO guarantees of Quartz's behavior if you directly manipulate the data in the tables, vs. using the Quartz API to submit the jobs/triggers.


I you need another application to schedule jobs (outside of the JVM where the scheduler is running and jobs will execute), setup a scheduler in that other app with the same database config (so it is pointing at the same tables), but do not call start() on that scheduler. You can then use the scheduler api to manage scheduling data, but not jobs will be triggered/execute on that instance.
gplummer

neo

Joined: 12/10/2009 15:55:32
Messages: 6
Offline

Thanks for the reply. I didn't mean to imply that I'm directly manipulating the data in the tables. That's not the case. I'm creating the JobDetail object and a SimpleTrigger and scheduling them through the Scheduler. I'm just monitoring the database as part of debugging, trying to figure out what's happening.
gplummer

neo

Joined: 12/10/2009 15:55:32
Messages: 6
Offline

I found the problem. I was inadvertently creating 2 schedulers and starting both of them. Once I got rid of one of them, everything is working fine.
gplummer

neo

Joined: 12/10/2009 15:55:32
Messages: 6
Offline

Spoke too soon. This problem seems to be working locally, but it is still failing in our TEST environment. Any help woiuld be greatly appreciated!!!
jhouse

seraphim
[Avatar]
Joined: 11/06/2009 15:29:56
Messages: 1703
Offline

Does your TEST environment have multiple nodes? And if so, does your quart.properties file specify isClustered=true ?
gplummer

neo

Joined: 12/10/2009 15:55:32
Messages: 6
Offline

Yes, the test environment does have multiple nodes. I've set isClustered=true and that seems to have fixed the problem. The tests that I ran all executed properly, I was even seeing both nodes execute jobs. We will run more tests tomorrow, but I'm confident that this was the solution. Thank you very very much, this fix will enable us to go to production on Thursday!!!!
gplummer

neo

Joined: 12/10/2009 15:55:32
Messages: 6
Offline

Ugh. Further testing has shown that this problem is still occuring. Any other ideas? I am pasting our quartz.properties file at the end of this message. The only things out of the ordinary is that we had to switch to StdJDBCDelegate rather than OracleDelegate as OracleDelegate was causing some issue that I don't even remember now.

Thanks, Greg

quartz.properties:

#============================================================================
# Configure Main Scheduler Properties
#============================================================================

org.quartz.scheduler.instanceName = Scheduler
org.quartz.scheduler.instanceId = AUTO

#============================================================================
# Configure ThreadPool
#============================================================================

org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 5
org.quartz.threadPool.threadPriority = 4

#============================================================================
# Configure JobStore
#============================================================================

org.quartz.jobStore.misfireThreshold = 60000

org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreCMT
#org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.useProperties = true
org.quartz.jobStore.dataSource = eipDS
org.quartz.jobStore.tablePrefix = OMX.QRTZ_
org.quartz.jobStore.isClustered = true
org.quartz.jobStore.nonManagedTXDataSource = eipDS

#============================================================================
# Configure Datasources
#============================================================================

org.quartz.dataSource.eipDS.jndiURL=java:/eipDS

#============================================================================
# Configure Plugins
#============================================================================

org.quartz.plugin.triggHistory.class = org.quartz.plugins.history.LoggingJobHistoryPlugin

org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.JobInitializationPlugin
# init plugin will load jobs.xml as a classpath resource i.e. /jobs.xml if not found on file system
org.quartz.plugin.jobInitializer.fileName=jobs.xml
org.quartz.plugin.jobInitializer.overWriteExistingJobs = false
org.quartz.plugin.jobInitializer.failOnFileNotFound = false
 
Forum Index -> Quartz
Go to:   
Powered by JForum 2.1.7 © JForum Team