RE: [PHP] How to launch a background task from a web page
| From: | bruce | Date: | Thu, 30 Oct 2008 17:43:24 +0000 |
| Subject: | RE: [PHP] How to launch a background task from a web page | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-282641@lists.php.net to get a copy of this message | ||
hey tony...
in linux, using the "&" causes the process to run in the background.
do a quick search/test from google, and test using php, from the cmdline.
ie
php
<?
time1
a=
ls -al &
time2
echo time2 - time1
?>
the above isn't correct, but you should get the idea...
once you've got the idea/process of running in the background down, you can
then check the same approach in the webapp...
have fun, and let us know how it goes..
-----Original Message-----
From: Tony Marston [mailto:tony@marston-home.demon.co.uk]
Sent: Thursday, October 30, 2008 9:39 AM
To: php-general@lists.php.net
Subject: [PHP] How to launch a background task from a web page
I have some long running scripts which I need to launch from a web page and
have them run in the background, but which should not cause the web page to
wait until the script finishes. Reading the manual on the backtick and
exec() operators seems to imply that the PHP function will be suspended
until the script finishes, which is not what I want. Is this possible in
PHP?
--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php