0
回答
quartz 集群使用数据库,另一个项目启动会报任务已经存在异常
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 6  
org.quartz.threadPool.threadPriority = 5 
org.quartz.scheduler.instanceName = Scheduler1    
org.quartz.scheduler.instanceId = AUTO  
org.quartz.jobStore.misfireThreshold = 60000   
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX  
org.quartz.jobStore.tablePrefix = QRTZ_ 
org.quartz.jobStore.dataSource = myDS
org.quartz.jobStore.isClustered = true  
org.quartz.jobStore.clusterCheckinInterval = 20000  
org.quartz.dataSource.myDS.driver = com.mysql.jdbc.Driver  
org.quartz.dataSource.myDS.URL = jdbc:mysql://192.168.10.20:3306/beikeo2o_quartz?useUnicode=true&characterEncoding=utf8&autoReconnect=true&failOverReadOnly=false
org.quartz.dataSource.myDS.user = aspuser
org.quartz.dataSource.myDS.password = 000000
org.quartz.dataSource.myDS.maxConnections = 12

#ResponseExpireJob
a.job = com.canyou.quartz.ResponseExpireJob
a.cron = 0 0/30 * * * ?
a.enable = false

#ResponseExpireJob
b.job = com.canyou.quartz.YunsignTestJob
b.cron = 0 0/5 * * * ?
b.enable = false

#AppointRemindJob
c.job = com.canyou.quartz.AppointRemindJob
c.cron = 0 10 12,17 * * ?
c.enable = false

#SampleRemindJob
d.job = com.canyou.quartz.SampleRemindJob
d.cron = 0 0 17 * * ?
d.enable = false

#QuestionnaireChangesJob
e.job = com.canyou.quartz.QuestionnaireChangesJob
e.cron = 0 1 0 * * ?
e.enable = false

#AllowanceCalculateJob
f.job = com.canyou.quartz.AllowanceCalculateJob
f.cron = 0 0 1 1 * ?
f.enable = false

#InvoiceJob
g.job = com.canyou.quartz.InvoiceJob
g.cron = 0 0 09 ? * MON-FRI
g.enable = false

#TestCluster
h.job = com.canyou.quartz.TestCluster
h.cron = 0/3 * * * * ?
h.enable = true

我是这样写的配置

<无标签>
举报
qwzh110
发帖于1年前 0回/36阅
顶部