Re: run php in background "atomic" - wild trick
| From: | Wico de Leeuw | Date: | Wed, 29 Nov 2000 16:53:40 +0000 |
| Subject: | Re: run php in background "atomic" - wild trick | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27832@lists.php.net to get a copy of this message | ||
just do Set_Time_Limit(0); ignore_user_abort(TRUE);
Your php script will run until it's completely done or gets killed
http://www.php.net/manual/function.set-time-limit.php
http://www.php.net/manual/function.ignore-user-abort.php
Greetz,
Wico
At 14:33 29-11-00 -0200, Leonardo Dias wrote:
Hi, Teodor! But then you won't be sure if the function was executed or not, right? What if we need it to be executed? The docs say nothing about it's "run probability", so you must take it as certain to execute. Just that one cannot debug easily (i.e. echos) and I had some trouble w/ it. Well, we need some support here. Rasmus? Andi? Zeev? How can we be sure that this is going to be executed? That would improve the speed of some DB work we do here. If we could just "background it"... humm... Maybe it's the case of inventing a function called background(). That function should just run another function in a background PHP process. It shouldn't be hard for PHP to do that, since you already can register a shutdown function and ignore user abort. Well, thanks for throwing some lights in our darkness here, anyway. -- Leonardo Dias Analista Programador / Analyst Programmer Catho Online www.catho.com.br -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net