在使用quartz做定时任务时,一般情况下,我们使用间隔时间执行任务,但有时候也需要完成一个任务后,再执行下一个任务,也就是不要并行执行。
我们可以简单使用 DisallowConcurrentExecution 特性标记。
DisallowConcurrentExecution
[DisallowConcurrentExecution] public class MyJob : IJob { }
此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据。
I am a Coder and Crypto-Trader.
GitHub主页:https://github.com/chengxulvtu 博客园主页:https://nianming.cnblogs.com 寻古诗词网:https://www.xungushici.com