NYCPHP Meetup

NYPHP.org

[nycphp-talk] broadcast emailer: is this sane strategy

David Mintz dmintz at davidmintz.org
Mon Aug 16 22:58:55 EDT 2004


Thanks everybody, this is all good stuff to think about.

I think saving to a db and using cron might be overkill because this isn't
something that's gonna happen more than once every few days, and at
irregular intervals, and it isn't going to be more than maybe 150, 200
emails at one shot, at least not in the forseeable future.

But I asked for advice and sound advice is what I got, in terms of
efficiency, security and (oh no, the S-word) scaleability, so thanks
again.

On Mon, 16 Aug 2004 drydell at att.net wrote:

> Just as an aside, it's possible to fork a detached php process, all you need to do is turn off stdin and stdout (and you should trap output/errors to a log):
>
> exec("/path/to/php /your/script.php 2>>/your/logfile.log >&- <&- >>/your/logfile.log");
>

That's what I'm doing (I think). Although -- correct me if I'm wrong -- I
believe technically that ain't true forking, as in pcntl_fork().


---
David Mintz
http://davidmintz.org/

        "Anybody else got a problem with Webistics?" -- Sopranos 24:17



More information about the talk mailing list