[DisallowConcurrentExecution] public abstract class BaseJob : IJob { public void Execute(IJobExecutionContext context) { //job逻辑 ExecuteJob(context); } public abstract void ExecuteJob(IJobExecutionContext context); }
添加上面代码里的属性: [DisallowConcurrentExecution] 即可完成任务的串行执行