#7704 [V2][Bug] don't fire triggers immediately on registration
Pull request opened by
popojk
Tracking issue
#7703
Why are the changes needed?
Problem:
Deploying a schedule trigger caused it to fire once immediately, instead of waiting for its next scheduled time.
What changes were proposed in this pull request?
In UpdateSchedules, advance the computed start time along the schedule to the first tick strictly after now before registering the job. This leaves the (lastExec, now] window to CatchupAll and starts the steady-state job at the next future tick.
• Cron and fixed-rate schedules: advanced via sched.Next, preserving alignment.
• Future start_time (fixed-rate): unchanged, since it's already after now.
How was this patch tested?
After the fix, the task will not be fired right after trigger deployed
Screenshot 2026-07-23 at 8 53 57 PM
Labels
Please add one or more of the following labels to categorize your PR:
•
added: For new features.
•
changed: For changes in existing functionality.
•
deprecated: For soon-to-be-removed features.
•
removed: For features being removed.
•
fixed: For any bug fixed.
•
security: In case of vulnerabilities
This is important to improve the readability of release notes.
Setup process
Screenshots
Check all the applicable boxes
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
Related PRs
Stack
If you do use
git town
to manage PR Stacks, the stack relevant to this PR
will show below. Otherwise, you can ignore this section.
Docs link
flyteorg/flyte