Re: EXEC and SYSTEM delay
| From: | Sam Stelfox | Date: | Thu, 23 Jul 2009 12:48:18 +0000 |
| Subject: | Re: EXEC and SYSTEM delay | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-295741@lists.php.net to get a copy of this message | ||
Well if the server your running on is linux based (and I haven't tried this) you could try adding a nohup and background the task for example rather than doing:
system('updatedb');
try
system('nohup updatedb &');
It should background the task and let it continue running even when the php script finishes it's execution. Like I said I haven't tested it. As a side note I used 'updatedb' in the example because it was the longest running task I could think of off the top of my head and requires root priveledges... You really shouldn't run your scripts as root. *A public server announcement*
Alberto García Gómez wrote:
Fellows: I'm experimenting problems with a call that I made to exec or system. The problem is that the script await for the function finish and that take's a lot of time. I need a way to use those functions in order to continue without await for it. Saludos Fraternales _____________________________ Atte. Alberto García Gómez M:.M:. Administrador de Redes/Webmaster IPI "Carlos Marx", Matanzas. Cuba.