操作定时作业修改

dev
cjy 2 weeks ago
parent 6d597fe9ed
commit 7ffd44879e

@ -85,17 +85,17 @@ namespace DS.Module.QuartzModuleInstall
.WithCronSchedule(configuration["JobConfig:" + jobKey1.Name])
);
});
var jobKey2 = new JobKey(nameof(WSLWeeklyReportJob));
services.AddQuartz(q =>
{
q.UseMicrosoftDependencyInjectionJobFactory();
q.AddJob<WSLWeeklyReportJob>(opts => opts.WithIdentity(jobKey2));
q.AddTrigger(opts => opts
.ForJob(jobKey2)
.WithIdentity(nameof(WSLWeeklyReportJob) + "-trigger")
.WithCronSchedule(configuration["JobConfig:" + jobKey2.Name])
);
});
//var jobKey2 = new JobKey(nameof(WSLWeeklyReportJob));
//services.AddQuartz(q =>
//{
// q.UseMicrosoftDependencyInjectionJobFactory();
// q.AddJob<WSLWeeklyReportJob>(opts => opts.WithIdentity(jobKey2));
// q.AddTrigger(opts => opts
// .ForJob(jobKey2)
// .WithIdentity(nameof(WSLWeeklyReportJob) + "-trigger")
// .WithCronSchedule(configuration["JobConfig:" + jobKey2.Name])
// );
//});
//var jobKey2 = new JobKey(nameof(BackgroundTaskJob));
//services.AddQuartz(q =>
//{

Loading…
Cancel
Save