Fix Worker-Cycle:

Periodic set last execution,
Print Running Worker-Names when done
This commit is contained in:
2025-07-03 22:48:06 +02:00
parent e8d612557f
commit 9743bb6e8e
3 changed files with 9 additions and 3 deletions

View File

@ -2,7 +2,7 @@ namespace API.Workers;
public interface IPeriodic
{
protected DateTime LastExecution { get; set; }
internal DateTime LastExecution { get; set; }
public TimeSpan Interval { get; set; }
public DateTime NextExecution => LastExecution.Add(Interval);
public bool IsDue => NextExecution <= DateTime.UtcNow;