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