ALiYunPostMessageJob.cs 816 B

12345678910111213141516171819202122232425
  1. using OASystem.API.OAMethodLib.Quartz.Business;
  2. using Quartz;
  3. namespace QuzrtzJob.Factory
  4. {
  5. public class ALiYunPostMessageJob : IJob
  6. {
  7. private readonly ILogger<ALiYunPostMessageJob> _logger;
  8. public ALiYunPostMessageJob(ILogger<ALiYunPostMessageJob> logger)
  9. {
  10. _logger = logger;
  11. }
  12. public Task Execute(IJobExecutionContext context)
  13. {
  14. _logger.LogInformation("调用阿里云短信接口 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
  15. //在此处编写任务业务代码
  16. DeleReminderMessage.PostMessageByWebhook();
  17. DeleReminderMessage.PostMessageByWebhook_CRMStatistics();
  18. DeleReminderMessage.PostMessageByWebhook_VisitToHR();
  19. return Task.CompletedTask;
  20. }
  21. }
  22. }