Answer the question
In order to leave comments, you need to log in
How to get a list of running php scripts?
Some php scripts that update information are constantly running, but sometimes they freeze or, even worse, when the page is refreshed, they launch a parallel version. Are there any built-in php tools to view running and currently running php pages, not just process information.
Unfortunately, I didn’t find anything and I was already going to write my own solution, where the script writes every minute to the file, just the time and at startup they will check the time the file was last modified to understand whether it is running or not. But for sure there is a beautiful solution built into PHP.
Answer the question
In order to leave comments, you need to log in
cron:
flock -w 3 /tmp/my_script.pid php /var/www/my_script.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question