public void Check() { _logger.LogInformation($"check service start checking, now is {DateTime.Now}"); //延迟执行后台脚本,仅执行一次 BackgroundJob.Schedule(() => _timeservice.Timer(), TimeSpan.FromMilliseconds(30)); _logger.LogInformation($"check is end, now is {DateTime.Now}"); }