当前位置:网站首页>@Disallowcurrentexecution prevents quartz scheduled tasks from executing in parallel
@Disallowcurrentexecution prevents quartz scheduled tasks from executing in parallel
2022-06-13 00:34:00 【Flying husky】
@DisallowConcurrentExecution Forbid concurrent execution of multiple of the same definition JobDetail, This note is added to Job On the class , But it doesn't mean you can't execute more than one at the same time Job, But you can't execute the same JobDefinition( from JobDetail Definition ), But you can do many different things at the same time JobDetail, Illustrate with examples : We have a Job class , be called SyncDataJobTask, And here Job Add this note , Then use this Job Turn on 2 Scheduled tasks , Mission 1: Sync data surface (5 Seconds at a time ), Mission 2: Sync area surface (5 Seconds at a time ), If the mission 2 stay 5 Processing is not completed within seconds , Then the task 2 No new thread will be started to run a new timer , It will not affect the task 1 Normal operation of .
@PersistJobDataAfterExecution Indicates when the normal execution is completed Job after ,JobDataMap The data in should be changed , To be called the next time . When using @PersistJobDataAfterExecution When the annotation , To avoid concurrency , Storing data causes confusion , You need to add @DisallowConcurrentExecution
@DisallowConcurrentExecution Used to implement Job On top of the class , Concurrent execution is not allowed , According to my previous understanding, the scheduling framework is not allowed to call at the same time Job class , Later, it was tested and found that this was not the case , It is Job( Mission ) Execution time of [ Such as the need to 10 second ] Time interval greater than task [Interval(5 second )], So by default , The scheduling framework is designed to allow tasks to execute at predetermined intervals , The new thread will be enabled to execute the task immediately . Otherwise, the task will be executed again after the task is completed !( This will result in tasks not being executed at pre-defined intervals )
边栏推荐
- June 13, 2022 Daily: Turing prize winner: what should we pay attention to if we want to succeed in our academic career?
- 6.824 Lab 2: Raft
- Buuctf's babysql[geek challenge 2019]
- A simple deadlock example
- Installation of IK word breaker
- Ad14 component pin name disappeared
- Delphi2009 connecting Oracle11g
- The whole process from entering URL to displaying page (interview)
- The difference between philosophy and Literature
- Go custom collation
猜你喜欢
![BUUCTF之BabySQL[极客大挑战 2019]](/img/6c/957e5e09f252210d0b4cf8771d4ade.png)
BUUCTF之BabySQL[极客大挑战 2019]

63. 不同路径 II

Using com0com/com2tcp to realize TCP to serial port (win10)

Machining Industry MES system Mold Industry MES system CNCl Medium Industry MES System MES code scanning and reporting MES data collection

Masa auth - overall design from the user's perspective

JPA execution failed in scheduled task -executing an update/delete query transactionrequiredexception

Mysql批量插入数据时如何解决重复问题?

Stack overflow learning summary

antdPro - ProTable 实现两个选择框联动效果

Several interview questions in TCP three grips and four swings
随机推荐
Explain bio, NiO, AIO in detail
[hcie discussion] rr-a
Can branches sign labor contracts with employees
[LeetCode]26. Removes duplicates from a sorted array thirty-three
How to quickly query the mobile phone number home and operator
Kali system -- dnsmap for DNS collection and analysis
Kalix system - use of information collection gadgets
MASA Auth - 从用户的角度看整体设计
Binary search the specified number of numbers in the array binary advanced
Machining Industry MES system Mold Industry MES system CNCl Medium Industry MES System MES code scanning and reporting MES data collection
The difference between philosophy and Literature
硬(磁)盘(二)
Generate two-dimensional code in Delphi
Tsinghua Bosch joint ml center, thbi lab:cheng Yang Ying | realize safety reinforcement learning through the value at risk of constraints
String类中split()方法的使用
Is the brokerage account in qiniu business school safe? Is the account opening rate low
Leetcode weekly -- April to May
After so long use, CSDN has finally opened a blog
Successfully installed opencv under delphixe
The origin of MySQL in bedtime stories