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?
Is there a way to run background tasks in PHP ?
Moderator: General Moderators
Re: Is there a way to run background tasks in PHP ?
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 ?
You might also invoke the script and use something like the technique in here?
http://ca3.php.net/manual/en/function.i ... -abort.php
http://ca3.php.net/manual/en/function.i ... -abort.php