Update ScheduledTaskExtensions.cs
This commit is contained in:
parent
2b2a53466f
commit
647d7c4a1c
1 changed files with 1 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ public static class ScheduledTaskExtensions
|
|||
|
||||
public static string CreateScheduledTask(this Task task, DateTime runTime, object? customData = null)
|
||||
{
|
||||
if (task.Status != TaskStatus.WaitingForActivation)
|
||||
if (task.Status != TaskStatus.Created)
|
||||
throw new InvalidOperationException("The task is already being executed or has been scheduled for execution.")
|
||||
.AttachData("Task", task)
|
||||
.AttachData("RunTime", runTime)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue