Skip to content

Commit 65db0e2

Browse files
committed
refresh only active
1 parent ee0a1c7 commit 65db0e2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ScheduledTasks/Entity/Schedule.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@ public void CreateSchedule(TaskEntityContext context, ScheduleCreationOptions sc
4747
if (alreadyExists)
4848
{
4949
this.State.ScheduleLastModifiedAt = DateTimeOffset.UtcNow;
50-
this.State.RefreshScheduleRunExecutionToken();
51-
this.State.NextRunAt = null;
50+
if (this.State.Status == ScheduleStatus.Active)
51+
{
52+
this.State.RefreshScheduleRunExecutionToken();
53+
this.State.NextRunAt = null;
54+
}
5255
}
5356
else
5457
{

0 commit comments

Comments
 (0)