Quartz Schdular 中的 JDBCJobStore 混乱
我正在使用 Quartz JDBCJobStore 并具有以下作业定义
JobDetail job=newJob(HelloJob.class).withIdentity("demo11", "group11").
usingJobData("jobSays", "Hello Vikas")
.usingJobData("myFloatValue", 3.141f).storeDurably(true).
build();
和触发器,因为
Trigger trigger=newTrigger().withIdentity("Trigger11","group11")
.startNow().withSchedule(CronScheduleBuilder.
cronSchedule("0 0/1 * * * ?")).build();
我印象 Quartz 会将 jobSays 和 myFloatValue 存储在数据库中,但我我在数据库中看不到任何此类属性。
有没有办法将这些JobData存储在数据库中?
这是 quartz.property 文件
org.quartz.scheduler.instanceName = MyScheduler
org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 3
org.quartz.jobStore.dataSource = myDS
org.quartz.dataSource.myDS.driver=com.mysql.jdbc.Driver
org.quartz.dataSource.myDS.URL=jdbc:mysql://localhost:3306/quartz
org.quartz.dataSource.myDS.user=root
org.quartz.dataSource.myDS.password=root
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.MSSQLDelegate
org.quartz.jobStore.tablePrefix = QRTZ_
I am using Quartz JDBCJobStore
and have following job definition
JobDetail job=newJob(HelloJob.class).withIdentity("demo11", "group11").
usingJobData("jobSays", "Hello Vikas")
.usingJobData("myFloatValue", 3.141f).storeDurably(true).
build();
and trigger as
Trigger trigger=newTrigger().withIdentity("Trigger11","group11")
.startNow().withSchedule(CronScheduleBuilder.
cronSchedule("0 0/1 * * * ?")).build();
I was of impression that Quartz will store jobSays
and myFloatValue
in the database but I am unable see any such property in the database.
Is there a way to store these JobData
in the database?
Here is the quartz.property
file
org.quartz.scheduler.instanceName = MyScheduler
org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 3
org.quartz.jobStore.dataSource = myDS
org.quartz.dataSource.myDS.driver=com.mysql.jdbc.Driver
org.quartz.dataSource.myDS.URL=jdbc:mysql://localhost:3306/quartz
org.quartz.dataSource.myDS.user=root
org.quartz.dataSource.myDS.password=root
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.MSSQLDelegate
org.quartz.jobStore.tablePrefix = QRTZ_
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Quartz 将作业数据以 BLOB 数据类型存储在 QRTZ_JOB_DETAILS 表中。
请检查那里。
Quartz stores job data as BLOB datatype in QRTZ_JOB_DETAILS table.
Please check there.