Background process (sending mails)
| From: | Pupeno | Date: | Wed, 21 Aug 2002 22:40:55 +0000 |
| Subject: | Background process (sending mails) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-113541@lists.php.net to get a copy of this message | ||
I know this issue have been discussed a lot of times but I checked a lot of
archives and documents and I couldn't find any solution.
What I want to do is send a lot of mails (belive me, it's not spamming) and
I thought about running the process of sending mails in background
(detached from the PHP script that runs it), so the page will return
immediatly and the other process will continue sending the mails in the
background.
I didn't find any way to run a process in the background from PHP
succesfully.
The manual says that using system(), if the stdout is redirected to a file,
it's run in background, I tryed redirecting stdout, stderr and stdin
to/from files and it still waits for the termination of the process, I
tryed adding & at the end of the process line and it didn't work neither.
Any idea of how I can do this (without using at, but maybe cron, I don't
know how) ?
Thank you.