Remove sheduled task from list when ran
This commit is contained in:
parent
7062259911
commit
2ff8cebe52
1 changed files with 3 additions and 0 deletions
|
|
@ -181,6 +181,9 @@ public static class UniversalExtensions
|
||||||
|
|
||||||
_ = Task.Delay(runTime.GetTimespanUntil().Milliseconds, CancellationToken.Token).ContinueWith(x =>
|
_ = Task.Delay(runTime.GetTimespanUntil().Milliseconds, CancellationToken.Token).ContinueWith(x =>
|
||||||
{
|
{
|
||||||
|
if (registeredScheduledTasks.ContainsKey(UID))
|
||||||
|
registeredScheduledTasks.Remove(UID);
|
||||||
|
|
||||||
if (x.IsCompletedSuccessfully)
|
if (x.IsCompletedSuccessfully)
|
||||||
task.Start();
|
task.Start();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue