恢复升级功能
This commit is contained in:
@@ -175,14 +175,18 @@ namespace BLW_Log
|
||||
);
|
||||
|
||||
|
||||
//<2F><>ͣ<EFBFBD><CDA3><EFBFBD><EFBFBD>
|
||||
//var jobKey5 = new JobKey("BuTingShengJi");
|
||||
//q.AddJob<ShengJiCaoZuoA>(opts => opts.WithIdentity(jobKey5));
|
||||
//q.AddTrigger(opts => opts
|
||||
// .ForJob(jobKey5)
|
||||
// .WithIdentity("BuTingShengJi-trigger")
|
||||
// .StartAt(DateTimeOffset.Now.AddMinutes(1))
|
||||
//);
|
||||
var isenable = builder.Configuration["ShengJi:IsEnable"];
|
||||
if (isenable.Equals("1"))
|
||||
{
|
||||
//<2F><>ͣ<EFBFBD><CDA3><EFBFBD><EFBFBD>
|
||||
var jobKey5 = new JobKey("BuTingShengJi");
|
||||
q.AddJob<ShengJiCaoZuoA>(opts => opts.WithIdentity(jobKey5));
|
||||
q.AddTrigger(opts => opts
|
||||
.ForJob(jobKey5)
|
||||
.WithIdentity("BuTingShengJi-trigger")
|
||||
.StartAt(DateTimeOffset.Now.AddMinutes(1))
|
||||
);
|
||||
}
|
||||
|
||||
});
|
||||
builder.Services.AddQuartzHostedService(q => q.WaitForJobsToComplete = true);
|
||||
|
||||
Reference in New Issue
Block a user