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
If the initial schedule run, started via triggerImmediately: true takes long enough that the next run gets triggered as per the provided cron schedule, that second schedule run does not get buffered but gets executed immediately.
I believe this is because the initial schedule run always gets executed with a default "AllowAll" overlap policy:
What are you really trying to do?
I'm creating a new schedule and I want to trigger it immediately. I don't want any overlapping schedule runs.
Describe the bug
I'm creating a new schedule using a combination of
ScheduleOverlapPolicy.BUFFER_ONE
andtriggerImmediately: true
, i.e.If the initial schedule run, started via
triggerImmediately: true
takes long enough that the next run gets triggered as per the provided cron schedule, that second schedule run does not get buffered but gets executed immediately.I believe this is because the initial schedule run always gets executed with a default "AllowAll" overlap policy:
sdk-typescript/packages/client/src/schedule-client.ts
Lines 246 to 249 in 4cf092d
A possible work-around is to create the schedule and then immediately trigger it ourselves using the correct overlap policy, i.e.
But I think
triggerImmediately: true
should honor the schedule's overlap policy instead of defaulting to the "AllowAll" policy.Minimal Reproduction
https://github.com/jhecking/samples-typescript/tree/schedules-trigger-immediately-overlapping/schedules-trigger-immediately-overlapping
Environment/Versions
Additional context
n/a
The text was updated successfully, but these errors were encountered: