当前位置:网站首页>@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 )
边栏推荐
- 6.824 Lab 1: MapReduce
- 在 Golang 中构建 CRUD 应用程序
- Ad14 component pin name disappeared
- Kalix system - use of information collection gadgets
- 浏览器控制台注入JS
- Five mock technologies of go
- ik分词器的安装
- Kali system -- dnsrecon for DNS collection and analysis
- 2022 constructor - Equipment direction - General Foundation (constructor) operation certificate examination questions and simulation examination
- C language standard IO, such as printf(), scanf(), etc
猜你喜欢

Transaction creation of btcd transaction process (I)

Real time preview of PHP in browser by vscade

Maya modeling VI
![Matlab [path planning] - UAV drug distribution route optimization](/img/b3/637fe426fcc960daf11bf640019589.png)
Matlab [path planning] - UAV drug distribution route optimization

1. Google grpc framework source code analysis Hello World

USTC of China University of science and technology: Minrui Wang | distribution network voltage stabilization based on transformer Multi-Agent Reinforcement Learning

Kalix system - use of information collection gadgets

Interprocess communication - shared memory shmat

A detailed explanation of synchronized

Several interview questions in TCP three grips and four swings
随机推荐
[LeetCode]26. Removes duplicates from a sorted array thirty-three
On the parameters of main function in C language
哲学和文学的区别
The difference between philosophy and Literature
Basics of network security (1)
2022 constructeur - direction de l'équipement - Fondation générale (constructeur) Questions d'examen du certificat d'exploitation et examen de simulation
[matlab] matrix transformation and matrix evaluation
String类中split()方法的使用
6.824 Lab 2: Raft
Target recognition gadget
June 13, 2022 Daily: Turing prize winner: what should we pay attention to if we want to succeed in our academic career?
Context of go concurrency mode
[LeetCode]13. Roman numerals to integers thirty
Maya modeling VI
A detailed explanation of synchronized
[LeetCode]20. Valid parentheses thirty-six
New blog address
Penetration test summary
Machining Industry MES system Mold Industry MES system CNCl Medium Industry MES System MES code scanning and reporting MES data collection
在 Golang 中构建 CRUD 应用程序