ProcessAndNotifySummaryJob.cs 830 B

123456789101112131415161718192021222324252627
  1. using OASystem.API.OAMethodLib.Quartz.Business;
  2. using Quartz;
  3. using QuzrtzJob.Factory;
  4. namespace OASystem.API.OAMethodLib.Quartz.Jobs
  5. {
  6. /// <summary>
  7. /// hotmail邮件汇总 发送
  8. /// </summary>
  9. public class ProcessAndNotifySummaryJob : IJob
  10. {
  11. private readonly ILogger<ProcessAndNotifySummaryJob> _logger;
  12. public ProcessAndNotifySummaryJob(ILogger<ProcessAndNotifySummaryJob> logger)
  13. {
  14. _logger = logger;
  15. }
  16. public Task Execute(IJobExecutionContext context)
  17. {
  18. _logger.LogInformation("hotmail汇总发送邮件 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
  19. //在此处编写任务业务代码
  20. ProcessAndNotifySummary.ProcessAndNotifySummaryAsync();
  21. return Task.CompletedTask;
  22. }
  23. }
  24. }