Hi All,

I have a PHP script that i want to run every few minutes (via cron) but I
only want it to run if it isn't already running.

Is there something in cron itself to solve this or is there a way within PHP
to detect that another instance of the current script is running and if so
exit the new instance before it does anything...

eg. I could have a function to use like so:

if (already_running($SCRIPT_NAME)) {
        exit();
}

Thanks in advance!

Simon


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to