php-general | 2001122

Re[2]: [PHP] Only one instance of a script at a time ! From: akul <email protected>
Date: 12/28/01

Hello Jerry,

Friday, December 28, 2001, 5:37:39 PM, you wrote:

JVU> Pseudo code:

JVU> check if pid file exists
yes ->> DIE
no ->> write pid file

JVU> At end of script
JVU> delete pid file

  This code can't guarantee the result. Use file locking instead.
  

JVU> -----Original Message-----
JVU> From: Nicolas Guilhot [mailto:nguilhot <email protected>]
JVU> Sent: Friday, December 28, 2001 3:32 PM
JVU> To: Php General MailingList
JVU> Subject: [PHP] Only one instance of a script at a time !

JVU> Running a php script with a cron job, how can I do to have only one instance
JVU> of the script running ?

-- 
Best regards,
 akul                            mailto:akul <email protected>

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>