Near
Near4mo ago

Guarantees for the timing of scheduled functions

Hey folks, I've got a question regarding the timing of scheduled functions (not cron jobs). While the docs describe guarantees regarding how often they are retried I haven't seen details about guarantees on the timing. I was curious if there are guarantees that the functions will be invoked on time (or at least with minimal delay) unlike with some other services where I've experienced up to minutes of delays.
7 Replies
Indy
Indy4mo ago
We try pretty hard to be on time, but there are no guarantees on which time window. E.g. if you schedule a massive amount at once specific time and things get overrun then we will back off and make sure things do get run but can't guarantee a particular time window.
Near
NearOP4mo ago
Is this based only on my own scheduled functions or generally across your infrastructure and other Convex users? Currently I don't expect that my personal use case would overrun the platform and I predict my scheduled times end up spread evenly. If scheduling is purely affected by my own usage and scheduling patterns I should be fairly fine.
lee
lee4mo ago
it is only affected by your own scheduled functions. the main thing to watch out for is scheduled functions that have OCC conflicts. e.g. if every scheduled function writes to the same document, the effective parallelism is reduced and you might get some delays.
Near
NearOP4mo ago
Reasonable. If it’s solely on me then I should most likely be fine. While I plan to schedule a lot it will hardly collide in terms of timing so I’m looking forward to implementing an MVP with Convex to see how well it ends up running.
Son
Son4mo ago
Whats the difference between a scheduled function vs a cron job in convex’s context, what use cases would you use one over another?
jamwt
jamwt4mo ago
a scheduled job is more flexible -- it's programmatically triggered a cron job is more of a standing configuration at deploy time to run certain things at certain intervals you can think of crons being built "out of" scheduled jobs it's a way to easily specify a standing set of scheduled jobs that should alway be running
Son
Son4mo ago
Thanks for the explanation!

Did you find this page helpful?