NutzCN Logo
问答 quart任务执行两次之后就不再执行了
发布于 2532天前 作者 qq_d6d46f6d 4630 次浏览 复制 上一个帖子 下一个帖子
标签:

org.quartz.jobStore.isClustered = false
之前使用flag为true的时候,执行几次也变成Found 0 triggers that missed their scheduled fire-time.
请问该如何调整

[DEBUG] 2018-01-16 20:34:30,005 org.quartz.impl.jdbcjobstore.SimpleSemaphore.obtainLock(SimpleSemaphore.java:81) - Lock 'TRIGGER_ACCESS' is desired by: defaultScheduler_QuartzSchedulerThread
[DEBUG] 2018-01-16 20:34:30,005 org.quartz.impl.jdbcjobstore.SimpleSemaphore.obtainLock(SimpleSemaphore.java:88) - Lock 'TRIGGER_ACCESS' is being obtained: defaultScheduler_QuartzSchedulerThread
[DEBUG] 2018-01-16 20:34:30,005 org.quartz.impl.jdbcjobstore.SimpleSemaphore.obtainLock(SimpleSemaphore.java:105) - Lock 'TRIGGER_ACCESS' given to: defaultScheduler_QuartzSchedulerThread
[DEBUG] 2018-01-16 20:34:30,063 org.quartz.impl.jdbcjobstore.SimpleSemaphore.releaseLock(SimpleSemaphore.java:132) - Lock 'TRIGGER_ACCESS' retuned by: defaultScheduler_QuartzSchedulerThread
[DEBUG] 2018-01-16 20:34:30,069 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'busJob'<class com.timemans.common.quartz.job.BusJob>
[INFO ] 2018-01-16 20:34:30,070 org.quartz.plugins.history.LoggingJobHistoryPlugin.jobToBeExecuted(LoggingJobHistoryPlugin.java:469) - Job d773052ab2574d7bb3cfe968a3c9719c.d773052ab2574d7bb3cfe968a3c9719c fired (by trigger d773052ab2574d7bb3cfe968a3c9719c.d773052ab2574d7bb3cfe968a3c9719c) at:  20:34:30 01/16/2018
[DEBUG] 2018-01-16 20:34:30,070 org.quartz.core.JobRunShell.run(JobRunShell.java:201) - Calling execute on job d773052ab2574d7bb3cfe968a3c9719c.d773052ab2574d7bb3cfe968a3c9719c
[INFO ] 2018-01-16 20:34:30,073 org.quartz.plugins.history.LoggingJobHistoryPlugin.jobWasExecuted(LoggingJobHistoryPlugin.java:513) - Job d773052ab2574d7bb3cfe968a3c9719c.d773052ab2574d7bb3cfe968a3c9719c execution complete at  20:34:30 01/16/2018 and reports: null
[DEBUG] 2018-01-16 20:34:30,079 org.quartz.impl.jdbcjobstore.SimpleSemaphore.obtainLock(SimpleSemaphore.java:81) - Lock 'TRIGGER_ACCESS' is desired by: defaultScheduler_Worker-2
[DEBUG] 2018-01-16 20:34:30,079 org.quartz.impl.jdbcjobstore.SimpleSemaphore.obtainLock(SimpleSemaphore.java:88) - Lock 'TRIGGER_ACCESS' is being obtained: defaultScheduler_Worker-2
[DEBUG] 2018-01-16 20:34:30,079 org.quartz.impl.jdbcjobstore.SimpleSemaphore.obtainLock(SimpleSemaphore.java:105) - Lock 'TRIGGER_ACCESS' given to: defaultScheduler_Worker-2
[DEBUG] 2018-01-16 20:34:31,715 org.quartz.impl.jdbcjobstore.SimpleSemaphore.releaseLock(SimpleSemaphore.java:132) - Lock 'TRIGGER_ACCESS' retuned by: defaultScheduler_Worker-2
[INFO ] 2018-01-16 20:34:37,074 org.quartz.plugins.history.LoggingJobHistoryPlugin.jobWasExecuted(LoggingJobHistoryPlugin.java:513) - Job d773052ab2574d7bb3cfe968a3c9719c.d773052ab2574d7bb3cfe968a3c9719c execution complete at  20:34:37 01/16/2018 and reports: null
[DEBUG] 2018-01-16 20:34:37,075 org.quartz.impl.jdbcjobstore.SimpleSemaphore.obtainLock(SimpleSemaphore.java:81) - Lock 'TRIGGER_ACCESS' is desired by: defaultScheduler_Worker-1
[DEBUG] 2018-01-16 20:34:37,075 org.quartz.impl.jdbcjobstore.SimpleSemaphore.obtainLock(SimpleSemaphore.java:88) - Lock 'TRIGGER_ACCESS' is being obtained: defaultScheduler_Worker-1
[DEBUG] 2018-01-16 20:34:37,075 org.quartz.impl.jdbcjobstore.SimpleSemaphore.obtainLock(SimpleSemaphore.java:105) - Lock 'TRIGGER_ACCESS' given to: defaultScheduler_Worker-1
[DEBUG] 2018-01-16 20:34:37,103 org.quartz.impl.jdbcjobstore.SimpleSemaphore.releaseLock(SimpleSemaphore.java:132) - Lock 'TRIGGER_ACCESS' retuned by: defaultScheduler_Worker-1
[DEBUG] 2018-01-16 20:36:21,449 org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3949) - MisfireHandler: scanning for misfires...
[DEBUG] 2018-01-16 20:36:21,477 org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3198) - Found 0 triggers that missed their scheduled fire-time.
[DEBUG] 2018-01-16 20:38:21,448 org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3949) - MisfireHandler: scanning for misfires...
[DEBUG] 2018-01-16 20:38:21,488 org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3198) - Found 0 triggers that missed their scheduled fire-time.
[DEBUG] 2018-01-16 20:40:21,448 org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3949) - MisfireHandler: scanning for misfires...
[DEBUG] 2018-01-16 20:40:21,473 org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3198) - Found 0 triggers that missed their scheduled fire-time.

配置文件

#==============================================================    
#Configure Main Scheduler Properties    
#==============================================================     
org.quartz.scheduler.instanceName = defaultScheduler
org.quartz.scheduler.instanceId = AUTO

#==============================================================    
#Configure JobStore     isClustered=true
#==============================================================   
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
#指定数据源名称
org.quartz.jobStore.dataSource=myDS
#指定表前缀
org.quartz.jobStore.tablePrefix = SYS_QRTZ_
org.quartz.jobStore.isClustered = false
org.quartz.jobStore.clusterCheckinInterval = 20000
org.quartz.jobStore.maxMisfiresToHandleAtATime = 120
org.quartz.jobStore.misfireThreshold = 120000
org.quartz.jobStore.txIsolationLevelSerializable = false

#==============================================================    
#Configure ThreadPool    d
#==============================================================   
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 2
org.quartz.threadPool.threadPriority = 5
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true

#==============================================================  
#Skip Check Update  
#update:true  
#not update:false  
#==============================================================  
org.quartz.scheduler.skipUpdateCheck = true

#============================================================================     
# Configure Plugins      
#============================================================================        
org.quartz.plugin.triggHistory.class = org.quartz.plugins.history.LoggingJobHistoryPlugin
org.quartz.plugin.shutdownhook.class = org.quartz.plugins.management.ShutdownHookPlugin
org.quartz.plugin.shutdownhook.cleanShutdown = true
#============================================================================
# NutDao dataSource
#============================================================================
org.quartz.dataSource.myDS.connectionProvider.class = org.nutz.integration.quartz.NutConnectionProvider

3 回复

是不是cron写得不对

使用的nutzwk中的功能,其中job是存入数据库的。这样配置取数据库的同时,也会读取cron.properties吗?
刚才又放开cron中注释,还是执行了几次就报了

单机的话, 是不是没必要用jdbc 存储了?

添加回复
请先登陆
回到顶部