Commit 4af82538 by guanzhenshan

1

parent dab2c002
...@@ -20,7 +20,7 @@ namespace Bailun.DC.DailyItemNoProfitRate ...@@ -20,7 +20,7 @@ namespace Bailun.DC.DailyItemNoProfitRate
//var _service = new Services(); //var _service = new Services();
//var day = DateTime.Parse(DateTime.Now.AddDays(-2).ToShortDateString()); //var day = DateTime.Parse(DateTime.Now.AddDays(-2).ToShortDateString());
////_service.Init(day.AddDays(-20), day); //_service.Init(day.AddDays(-20), day);
//_service.OneDayItemNoProfitRate(day.AddDays(-1), day); //_service.OneDayItemNoProfitRate(day.AddDays(-1), day);
} }
} }
......
...@@ -28,7 +28,7 @@ namespace Bailun.DC.DailyItemNoProfitRate ...@@ -28,7 +28,7 @@ namespace Bailun.DC.DailyItemNoProfitRate
{ {
var now = DateTime.Now; var now = DateTime.Now;
if ((now.Hour == 19 && now.Minute == 05)) //19:05启动 if ((now.Hour == 17 && now.Minute == 05)) //17:05启动
{ {
Console.WriteLine("开始启动 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); Console.WriteLine("开始启动 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
var day = DateTime.Parse(now.AddDays(-1).ToShortDateString()); var day = DateTime.Parse(now.AddDays(-1).ToShortDateString());
......
...@@ -7,27 +7,31 @@ namespace Bailun.DC.SkuDailyPurchaseAndSales ...@@ -7,27 +7,31 @@ namespace Bailun.DC.SkuDailyPurchaseAndSales
{ {
class Program class Program
{ {
static async Task Main(string[] args) //static async Task Main(string[] args)
{
Console.WriteLine("每日销进差异汇总");
var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
{
services.AddHostedService<Services>();
});
await builder.RunConsoleAsync();
}
//static void Main(string[] args)
//{ //{
// var start = DateTime.Parse("2020-08-30"); // Console.WriteLine("每日销进差异汇总");
// while (start.AddDays(1) < DateTime.Now) // var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
// { // {
// Console.WriteLine(start.ToString("yyyy-MM-dd")); // services.AddHostedService<Services>();
// new Services().Init(start, start.AddDays(1)); // });
// start = start.AddDays(1);
// } // await builder.RunConsoleAsync();
//} //}
static void Main(string[] args)
{
var start = DateTime.Parse("2020-11-30");
new Services().Init(start, start.AddDays(1));
return;
while (start.AddDays(1) < DateTime.Now)
{
Console.WriteLine(start.ToString("yyyy-MM-dd"));
new Services().Init(start, start.AddDays(1));
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