Why is the limit for outstanding scheduled functions set to 1,000,000?
❔Advice🎁Feature Request
I’m trying to understand the reasoning behind this because it feels a bit restrictive depending on the use case. Scheduled functions are much more precise than cron jobs, so they’re a really nice fit for things like expirations.
Take a simple example. Say you have 10,000 customers. Each customer creates 20 offers with an expiry date about two weeks in the future. That’s already 200,000 scheduled functions sitting in the system. Now imagine you also have other expiring documents or background workflows tied to users. If each customer adds just 30 more scheduled events, you’re at 10,000 × 50 = 500,000 scheduled functions without doing anything unusual.
Scale that up a bit more and you can hit 1,000,000 pretty quickly, even though all those functions are spread over days or weeks and not executing at the same time.
So I’m curious if this limit is due to internal storage or scheduling constraints, or if there are recommended patterns to handle this kind of workload while keeping the same level of timing precision. This could be solved by increasing the number of scheduled functions at a time