Is there a way to run background tasks in PHP ?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
vorius
Forum Newbie
Posts: 8
Joined: Fri Jan 18, 2008 7:05 pm

Is there a way to run background tasks in PHP ?

Post by vorius »

I was wondering if I could kick off some background task in a separate thread on server start ?

In my particular situation, I would use this so my web app would generate an e-mail every week at a specific time, without me having to manually make a request to any page.

Is this possible?
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: Is there a way to run background tasks in PHP ?

Post by onion2k »

Use cron (on unix) or Windows Task Scheduler (on Windows) to call the script.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Is there a way to run background tasks in PHP ?

Post by alex.barylski »

You might also invoke the script and use something like the technique in here?

http://ca3.php.net/manual/en/function.i ... -abort.php
Post Reply