Published 6 months ago by ahmedyousuf
hey, I have 500+ scheduling jobs and i want to run it with database i don't want to use crontabs.. how could i manged these job with database??
If you can't use cronjobs, you have to be inventive I guess. And that depends on how scheduled your jobs need to be.
You could route all your requests through a middleware which triggers your jobs. That middleware will store a timestamp in the database and if this call is less then x minutes than the timestamp, it'll just skip and move on. If the timestamp is older than x minutes, the middleware will run or trigger your jobs.
It'll be a real bitch for the visitor who has to wait for the jobs to be run, but hey. You need to think of something. Either that or move to a provider which does allow you to use cronjobs.