Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I keep a PHP script running after I close the page?

Status
Not open for further replies.

LeonKl2

Programmer
Jun 16, 2003
26
US
I'm trying to make a PHP script do something similar to a mailer program that I used.

It was written in PHP and I would tell it to email my list and then close the page. It would email the list and about 15 minutes or so later I would recieve an email that it was completed.

I'm trying to make the same thing.
Except in my program whenever I close the page, the PHP script stops.

How do I make it keep running even when I close the page?

Thanks,
Leon
 
You can't. I imagine that the other application did something like write the message and recipient list to a file somewhere. The other application then scheduled another application to run, read the file, and send the emails.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
I'm pretty sure its possible.
Because the way the autoresponder does it, is it starts sending the emails as I'm watching the page and displays the email addresses that it has sent to, but then after a little while the page freezes.

Is there any other way to do it in Perl possibly?

Or how do I schedule another application to do it like you said?
 
isn't it possible to start a cron job or something like that ??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top