Commit 52114415 by 泽锋 李

fix

parent 9e14f1f8
......@@ -12,7 +12,7 @@ namespace AutoGeneratePurchaseAdvise
public class GeneratePurchaseAdviseBackgroundService : BackgroundService
{
private Timer _timer;
public DateTime? last_task_date = null;
protected override Task ExecuteAsync(CancellationToken stoppingToken)
{
......@@ -25,7 +25,12 @@ namespace AutoGeneratePurchaseAdvise
try
{
var now = DateTime.Now;
if(last_task_date!=null && now.ToString("yyyy-MM-dd HH:mm")== last_task_date.Value.ToString("yyyy-MM-dd HH:mm"))
{
return;
}
last_task_date = now;
//Console.WriteLine($"last_task_date : {last_task_date.Value.ToString("yyyy-MM-dd HH:mm:ss")}" );
//if (now.Hour == 5 && now.Minute == 29)
//{
......
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