You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Run now on a paused one-time task deletes the task #38453
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
Create a one-time scheduled task for a time in the future, and pause it.
Click Run now on it. Run now works while a task is paused.
Let the run finish successfully.
Since #37991, a successful run of a once task deletes the task when next_run_at IS NULL, which is taken as proof that the occurrence was used up (ScheduledTaskService.ts, the DELETE FROM scheduled_tasks … AND next_run_at IS NULL after a run settles). A paused task always has a null next_run_at, so the rule also matches a paused task that was only run by hand.
Expected behavior
The paused task stays with its configured time and the manual run recorded, so resuming it before that time schedules it again. Only a run at or after that time uses it up.
Actual behavior
The task is deleted as soon as the manual run succeeds, so its scheduled time is lost and the user has to recreate it.
Activity
test(server): a paused one-time task run by hand before its time is kept