Answer the question
In order to leave comments, you need to log in
Running cron every 5 seconds?
Good day!
I would like to receive sensible advice from experienced specialists.
There is a PHP project that displays live football match data. He receives this information from a sports data provider. For this, only one url is used , which contains an xml file with up-to-date data, and which is updated on their side at a certain interval (5-10 seconds).
Updating the data, in turn, is already done on our side by cron. But there is a question here. How to make cron run every 5 seconds but check if a previous instance is running. If it is running, then, accordingly, a new instance is not launched (as it happens that the data parsing process can run from 3 to 10 seconds).
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question