protected override async Task ExecuteAsync(CancellationToken cancellationToken) { while (!cancellationToken.IsCancellationRequested) { try { AcquisitionUnit unit = new AcquisitionUnit(); unit.Result = EnumAcquisitionUnit.SUCCESS; dbStorage.SaveAcquisitionUnit(unit); List <string> list = new List <string> { @"https://wx.5i5j.com/xiaoqu/o3/", @"https://wx.5i5j.com/xiaoqu/o3n2/" }; list.ForEach(item => { Process(item, unit); }); } catch (Exception e) { Console.WriteLine(e.Message); } await Task.Delay(1000 * 60 * 30); } }