Update daily praing to weekly
This commit is contained in:
parent
ad0bc0e49b
commit
eea11029e9
@ -28,7 +28,7 @@ namespace WebAPI.Services.ScheduledTask
|
|||||||
|
|
||||||
public bool CheckTime(DateTime time)
|
public bool CheckTime(DateTime time)
|
||||||
{
|
{
|
||||||
if(NextRunningTime == null)
|
if (NextRunningTime == null)
|
||||||
{
|
{
|
||||||
this.SetNextRunningTime();
|
this.SetNextRunningTime();
|
||||||
return false;
|
return false;
|
||||||
@ -54,7 +54,8 @@ namespace WebAPI.Services.ScheduledTask
|
|||||||
}
|
}
|
||||||
private void SetNextRunningTime()
|
private void SetNextRunningTime()
|
||||||
{
|
{
|
||||||
NextRunningTime = DateTimeHelper.Today().AddDays(1).AddHours(8);
|
//NextRunningTime = DateTimeHelper.Today().AddDays(1).AddHours(8);
|
||||||
|
NextRunningTime = DateTimeHelper.GetNextWeekday(DateTimeHelper.Today(), DayOfWeek.Monday).AddHours(8);
|
||||||
loggingService.Log($"Scheduled Task {this.Description}", NextRunningTime.Value);
|
loggingService.Log($"Scheduled Task {this.Description}", NextRunningTime.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user