当前位置:网站首页>@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 )
边栏推荐
- Generate two-dimensional code in Delphi
- [LeetCode]21. Merge two ordered linked lists twenty-nine
- Conversion of integer part and decimal part between binary / octal / decimal / hexadecimal
- Browser console injection JS
- PMP registration conditions, time, cost, new version related information
- ucore lab3
- [LeetCode]1. Sum of two numbers thirty-four
- How to visit a website
- DNS attack surface analysis
- The difference between philosophy and Literature
猜你喜欢
![[CISCN2019 华北赛区 Day2 Web1]Hack World --BUUCTF](/img/1e/ebf8cc06ba620261f03f84ca2c68e6.png)
[CISCN2019 华北赛区 Day2 Web1]Hack World --BUUCTF

安全事故等级划分为哪几级
![[GXYCTF2019]禁止套娃--详解](/img/c8/8c588ab8f58e2b38b9c64c4ccd733f.png)
[GXYCTF2019]禁止套娃--详解

Browser cache execution process
![[vscode]todo tree a to-do plug-in](/img/52/c977bc9cd021ca6fd12bcc22ae9f78.jpg)
[vscode]todo tree a to-do plug-in

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

Kalix system - use of information collection gadgets

Basics of network security (1)
![[GYCTF2020]Ezsqli --BUUCTF](/img/8b/3c8b48daf7719482a235fd622737aa.png)
[GYCTF2020]Ezsqli --BUUCTF
![[matlab] matrix transformation and matrix evaluation](/img/71/b7614e2e4ea2dda0f44f0ea8bcbf45.png)
[matlab] matrix transformation and matrix evaluation
随机推荐
After so long use, CSDN has finally opened a blog
[LeetCode]21. Merge two ordered linked lists twenty-nine
Stm32f4 development of DMA transmission to GPIO port
Ad14 component pin name disappeared
APISpace 空号检测API接口 免费好用
6.824 Lab 2: Raft
浏览器缓存的执行流程
[CISCN2019 华北赛区 Day2 Web1]Hack World --BUUCTF
What are the levels of safety accidents
RCC clock configuration of stm32f401
[matlab] basic operation
Lambda expression
新增博客地址
BUUCTF之BabySQL[极客大挑战 2019]
[MRCTF2020]Ez_ bypass --BUUCTF
VHDL programming experiment exercises collection
The difference between caching and buffering
Some basic design knowledge
[hcie discussion] rr-a
New blog address