示例#1
0
 private async Task TriggerJobs()
 {
     while (true)
     {
         if (DateTime.Now.Subtract(_lastCheck).Days > 0)
         {
             Log.Information($"Day has passed!");
             _lastCheck = DateTime.Now;
             DateTime         passedDay = _lastCheck.AddDays(-1);
             TriggerTriggered e         = new TriggerTriggered(Guid.NewGuid());
             //await _messagePublisher.PublishMessageAsync(e.MessageType, e, "");
         }
         await Task.Delay(10000);
     }
 }
示例#2
0
 private async Task HandleAsync(TriggerTriggered triggertriggered)
 {
     await Task.Delay(2000);
 }