Re: [nyphp-talk] PHP and running background tasks...

2007-02-26 Thread Jiju Thomas Mathew
A good answer in this case is to write a cron job/scheduled task that wakes up every five minutes, sends a few mails, and then dies. The background job is controlled by a work queue, which could be a table in the database. A system like this can send e-mail messages, gather information,

Re: [nyphp-talk] PHP and running background tasks...

2007-02-25 Thread Paul Houle
Brian Dailey wrote: From the last link: "Note that you should never attempt to use these process control forking functions when using a webserver; you should only fork applications when using the PHP command line client." Another strategy is to write a long-running service task in a cron job

Re: [nyphp-talk] PHP and running background tasks...

2007-02-24 Thread Brian Dailey
That's actually a really good suggestion. Instead of just scheduling a job that updates all caches that are X number of days old I can just update the ones that have been requested in the past day. I appreciate all of the input! - Brian inforequest wrote: Brian Dailey support-at-dailytechnolo

Re: [nyphp-talk] PHP and running background tasks...

2007-02-24 Thread inforequest
Brian Dailey support-at-dailytechnology.net |nyphp dev/internal group use| wrote: From the last link: "Note that you should never attempt to use these process control forking functions when using a webserver; you should only fork applications when using the PHP command line client." I guess

Re: [nyphp-talk] PHP and running background tasks...

2007-02-24 Thread Rolan Yang
AJAX. But I think you need to give us some more info. Edward JS Prevost II [EMAIL PROTECTED] www.EdwardPrevost.info - Original Message - From: "Brian Dailey" <[EMAIL PROTECTED]> To: "NYPHP Talk" Sent: Saturday, February 24, 2007 8:13 PM Subject: [nyphp-

Re: [nyphp-talk] PHP and running background tasks...

2007-02-24 Thread Brian Dailey
From the last link: "Note that you should never attempt to use these process control forking functions when using a webserver; you should only fork applications when using the PHP command line client." I guess that kind of answers my question. exec() might actually be the only solution, I'm no

Re: [nyphp-talk] PHP and running background tasks...

2007-02-24 Thread Hans C. Kaspersetz
Fork off a php process and let it run separately. I think Synder, Hans Z and Hendry were doing this for a app a couple of years ago with some success. When the forked process is done it calls the original script and reports. But you have to be conscious of garbage processes. http://us3.ph

Re: [nyphp-talk] PHP and running background tasks...

2007-02-24 Thread Hans C. Kaspersetz
Brian Dailey wrote: Hey guys, my google-fu is failing me today so I thought I would turn to the brilliant minds of the NYPHP. What I'd like to do is be able to execute a php script in the background that does NOT impact the load time of the page itself. Something that runs in the background a

Re: [nyphp-talk] PHP and running background tasks...

2007-02-24 Thread CED
exec(), or AJAX. But I think you need to give us some more info. Edward JS Prevost II [EMAIL PROTECTED] www.EdwardPrevost.info - Original Message - From: "Brian Dailey" <[EMAIL PROTECTED]> To: "NYPHP Talk" Sent: Saturday, February 24, 2007 8:13 PM Subject: [n

[nyphp-talk] PHP and running background tasks...

2007-02-24 Thread Brian Dailey
Hey guys, my google-fu is failing me today so I thought I would turn to the brilliant minds of the NYPHP. What I'd like to do is be able to execute a php script in the background that does NOT impact the load time of the page itself. Something that runs in the background and doesn't tie up the