How to determine if a script instance is already running?

From: Date: Tue, 02 Aug 2005 13:49:25 +0000
Subject: How to determine if a script instance is already running?
Groups: php.general 
Request: Send a blank email to php-general+get-219821@lists.php.net to get a copy of this message
I have a command line script that needs to run continuously, and so I plan to have cron execute it every so often. I want to have the script first check to see if another instance is already running and, if so, die(). Now, I know I can exec the process list and parse through the output, but is there and easier, faster, cooler, sexier, better way? :o) JM

« previous php.general (#219821) next »