Answer the question
In order to leave comments, you need to log in
CRON task every minute is it ok?
Hello, is it ok to create a task in CRON for every minute?
For example, I need to execute a certain php script every minute that checks the database.
And is it normal to do queries to the database every minute?
Answer the question
In order to leave comments, you need to log in
Not normal.
And if you need to run every half a minute, will you insert sleep?
What if the task lasts longer than a minute?
Apparently, you have chosen the wrong tool. Perhaps you need to do on some event, and not check the database. Think about queues.
We put the event in the queue - the queue handler processed it without delay.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question