Commit a61f79aa by guanzhenshan

1

parent 0994d767
...@@ -12,28 +12,28 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction ...@@ -12,28 +12,28 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction
/// </summary> /// </summary>
/// <param name="args"></param> /// <param name="args"></param>
/// <returns></returns> /// <returns></returns>
//static async Task Main(string[] args) static async Task Main(string[] args)
//{
// Console.WriteLine("启动服务 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
// var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
// {
// services.AddHostedService<Services>();
// });
// await builder.RunConsoleAsync();
//}
static void Main(string[] args)
{ {
var _services = new Services(); Console.WriteLine("启动服务 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
var start = DateTime.Parse("2020-04-01");
while (start.AddDays(1) < DateTime.Now)
{ {
Console.WriteLine(start); services.AddHostedService<Services>();
_services.Init(start); });
start = start.AddDays(1);
} await builder.RunConsoleAsync();
} }
//static void Main(string[] args)
//{
// var _services = new Services();
// var start = DateTime.Parse("2020-04-01");
// while (start.AddDays(1) < DateTime.Now)
// {
// Console.WriteLine(start);
// _services.Init(start);
// start = start.AddDays(1);
// }
//}
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment