Пример #1
0
        public Task TaskRoutine()
        {
            while (true)
            {
                _gitService.GetCovidData();
                _excelService.GenerateStats();


                //Wait 5 minutes till next execution
                DateTime nextStop     = DateTime.Now.AddDays(1);
                var      timeToWait   = nextStop - DateTime.Now;
                var      millisToWait = timeToWait.TotalMilliseconds;
                Thread.Sleep((int)millisToWait);
            }
        }
 public ActionResult <string> SendEmail()
 {
     _excelService.GenerateStats();
     return(Ok("Generated"));
 }