[backend/api] Update trigger timestamp after manual cron task runs (ISH-760)
This commit is contained in:
parent
01cc7b08d9
commit
d2f1048dcc
1 changed files with 5 additions and 1 deletions
|
@ -306,7 +306,11 @@ public class AdminController(
|
|||
var task = cronSvc.Tasks.FirstOrDefault(p => p.Task.GetType().FullName == id)
|
||||
?? throw GracefulException.NotFound("Task not found");
|
||||
|
||||
Task.Factory.StartNew(async () => await cronSvc.RunCronTaskAsync(task.Task, task.Trigger),
|
||||
Task.Factory.StartNew(async () =>
|
||||
{
|
||||
await cronSvc.RunCronTaskAsync(task.Task, task.Trigger);
|
||||
task.Trigger.UpdateNextTrigger();
|
||||
},
|
||||
CancellationToken.None,
|
||||
TaskCreationOptions.DenyChildAttach | TaskCreationOptions.LongRunning,
|
||||
TaskScheduler.Default);
|
||||
|
|
Loading…
Add table
Reference in a new issue