My platform is getting bigger and bigger, with different entitites that requires constantly checking states for invalidation.
My default way to handle invalidation is to build a cron job that will check every X minutes, but that was Fagner without Convex.
With Convex we can use schedulers to run a specific action after a certain period, and it got me thinking: When scheduler is better than cron?
With a cron job, I will check every entity and usually have a little bit of staleness (something that should be invalidated 3 minutes ago), and it will always read more than the necessary.
With a schedule, I will be precise, but sometimes I will be targeting an entity that shouldn't be invalidated (entity is now active again)
And that's what I'm trying to understand, which one is better and how to decide it.