这是一款只需要在控制器中的Action中加上特性即可实现定时任务的类库,极大的简化了Quartz的使用流程
1、将类库引用到项目中
2、在 Startup.cs 中的 ConfigureServices 方法里调用 services.AddAttributeQuartz(); 添加特性定时服务
3、在 Startup.cs 中的 Configure 方法里调用 app.StartAttributeQuartz(); 来启动特性定时任务
1、完成安装操作之后,只需要在需要执行定时任务的Action上加入特性 QuartzTask 就可以实现定时任务了
1、如果指定CronExpression参数,则不需要指定IntervalInSeconds、IsRepeatForever、RepeatCount参数
QQ:279202647 作者:Core园主