One solution would be to have the script write it's process ID in some .pid
file. Since a process ID is per instance of the script, this should provide you
with the functionality you're looking for.

John

On Fri, 27 Apr 2001, Nikhil Goyal wrote:

> I need to set up a script such that only one instance of it is running at a
> time i.e. in case the script is already executing, it will not be started
> again.
> 
> My problem is on a script taking a long time to execute (like it should) - I
> find that for some reason the script stops somewhere in the middle and
> starts to re-execute. I wish to catch this re-execute and halt the script
> instead
> 
> N
> 
> 
> 
> 

-- 

John Donagher
Application Engineer
Intacct Corp. - Powerful Accounting on the Web
408-395-0989
720 University Ave.
Los Gatos CA 95032
www.intacct.com

Public key available off http://www.keyserver.net
Key fingerprint = 4024 DF50 56EE 19A3 258A  D628 22DE AD56 EEBE 8DDD


-- 
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