ProductionScheduleJob.cs 917 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using Quartz;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace Business.Quartz
  8. {
  9. /// <summary>
  10. /// 排产定时任务
  11. /// </summary>
  12. public class ProductionScheduleJob : IJob
  13. {
  14. public readonly ProductionScheduleAppService _appService;
  15. /// <summary>
  16. /// 构造函数
  17. /// </summary>
  18. public ProductionScheduleJob(ProductionScheduleAppService appService)
  19. {
  20. _appService = appService;
  21. }
  22. /// <summary>
  23. /// 执行
  24. /// </summary>
  25. /// <param name="context"></param>
  26. /// <returns></returns>
  27. /// <exception cref="NotImplementedException"></exception>
  28. public Task Execute(IJobExecutionContext context)
  29. {
  30. _appService.DoExt();
  31. return Task.CompletedTask;
  32. }
  33. }
  34. }