Skip to content

Commit 448eb30

Browse files
committed
save
1 parent ceaf8e4 commit 448eb30

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ScheduledTasks/Entity/Schedule.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public void CreateSchedule(TaskEntityContext context, ScheduleCreationOptions sc
4444
this.TryStatusTransition(nameof(this.CreateSchedule), ScheduleStatus.Active);
4545

4646
this.State.RefreshScheduleRunExecutionToken();
47+
this.State.ScheduleCreatedAt = this.State.ScheduleLastModifiedAt = DateTimeOffset.UtcNow;
4748
this.logger.CreatedSchedule(this.State.ScheduleConfiguration.ScheduleId);
4849

4950
// Signal to run schedule immediately after creation and let runSchedule determine if it should run immediately
@@ -88,6 +89,8 @@ public void UpdateSchedule(TaskEntityContext context, ScheduleUpdateOptions sche
8889
return;
8990
}
9091

92+
this.State.ScheduleLastModifiedAt = DateTimeOffset.UtcNow;
93+
9194
// after schedule config is updated, perform post-config-update logic separately
9295
foreach (string updatedScheduleConfigField in updatedScheduleConfigFields)
9396
{

0 commit comments

Comments
 (0)