Serverless scheduling #530
Unanswered
innermatrix
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My goal is to use the
pg-boss
scheduler in serverless context. The idea is along the lines ofpg-boss
instance in that lambda to find all scheduled tasks that need to be runpg-boss
instanceBut the problem that I have with this is that currently (as I understand from reading the code) the
pg-boss
scheduler will only run a scheduled task if the scheduler invocation takes place <60s after the scheduled task time, and the shortest interval that EventBridge timers can use to invoke lambdas is 1min. So there's a small, but non-zero, probability that a scheduled task will be missed if the timing of the lambda invocation is such that one scheduler check takes place slightly before "scheduled time N + 60s" and the next scheduler check takes place slightly after "scheduled time N+1 + 60s".Furthermore, maybe I don't want to pay to run a lambda every 1min — maybe I'd rather run the lambda every 10min, as long as I am okay with the implications that has on my scheduled tasks (meaning that I am okay if
5 * * * *
and6 * * * *
schedules actually both run at ~the same time around 10min after the hour, and a5,6 * * * *
schedule gets debounced so it only runs once per hour at around 10min after the hour).So, what I am wondering is
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions