java quartz 失败重试_Quartz Scheduler:java.lang.IllegalStateException:JobStore已关闭 - 正在中止重试...

#============================================================================

# Configure Main Scheduler Properties

#============================================================================

org.quartz.scheduler.instanceName: MyScheduler

org.quartz.scheduler.instanceId: instance_one

org.quartz.scheduler.skipUpdateCheck: true

#============================================================================

# Configure ThreadPool

#============================================================================

org.quartz.threadPool.class: org.quartz.simpl.SimpleThreadPool

org.quartz.threadPool.threadCount: 5

org.quartz.threadPool.threadPriority: 5

#============================================================================

# Configure JobStore

#============================================================================

org.quartz.jobStore.misfireThreshold = 60000

org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX

org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate

org.quartz.jobStore.useProperties = false

org.quartz.jobStore.dataSource = quartz_cluster

org.quartz.jobStore.tablePrefix = QRTZ_

org.quartz.jobStore.isClustered = true

#============================================================================

# Configure Datasources

#============================================================================

org.quartz.dataSource.quartz_cluster.driver = com.mysql.cj.jdbc.Driver

org.quartz.dataSource.quartz_cluster.URL = jdbc:mysql://localhost:3306/quartz_cluster

org.quartz.dataSource.quartz_cluster.user = root

org.quartz.dataSource.quartz_cluster.password = root

org.quartz.dataSource.quartz_cluster.maxConnections = 5

每当我运行上面的属性石英,我的工作开始的执行和后执行4次,我得到以下异常:

[ERROR] - [2016-09-15 13:55:03,150] - [org.quartz.core.QuartzSchedulerThread] Runtime error occurred in main trigger firing loop.

java.lang.IllegalStateException: JobStore is shutdown - aborting retry

at org.quartz.impl.jdbcjobstore.JobStoreSupport.retryExecuteInNonManagedTXLock(JobStoreSupport.java:3772)

at org.quartz.impl.jdbcjobstore.JobStoreSupport.releaseAcquiredTrigger(JobStoreSupport.java:2881)

at org.quartz.core.QuartzSchedulerThread.releaseIfScheduleChangedSignificantly(QuartzSchedulerThread.java:432)

at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:316)

以下是我的工作细节:

newJob(MyJob.class)

.withDescription("The myjob job")

.withIdentity("job-one", "group-one")

.usingJobData(jobDataMap)

.requestRecovery(true)

.build();

以下是我的触发细节:

newTrigger()

.withIdentity("trigger-one", "group-one")

.withSchedule(cronSchedule("0/15 * * * * ?")

.withMisfireHandlingInstructionFireAndProceed())

.build();

我没有得到异常的实际问题?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值