|
Posted by Sacs on 10/29/89 11:33
swpulitzer@yahoo.com wrote:
> This question probably doesn't belong in this forum, but since I'm
> planning on using php as my main site implementation tool, I thought it
> would be a good place to start. I'm new to php, and am looking to setup
> a small/medium sized PHP-mySQL driven site.
>
> One of the aspects of this site will be that registered users will be
> able to store times when they want to receive emailed alerts. These
> times will be stored in the database...easy enough. My question is:
> what's the best way to setup the functionality of triggering the
> alerts? I don't really know where to start.
>
> I would assume that I need to have some executable running in the
> background that periodically (say once every minute) polls the
> database, and acts on any scheduled alerts that have come due by
> sending the emails. Also, since I need to run such a program, any
> possibility of hosting this site on someone else's server is probably
> out, right?
>
> I'm sure lots of people have dealt with similar situations. What's the
> standard approach?
>
> Like I said, it's not really a php question. But I would appreciate any
> direction anyone would be willing to offer. Thanks in advance.
>
The usual way to do this is with cron which allows you to run a program
at specified periods. You will have to check with your hosting service
whether they provide cron, many do.
1 minute intervals is probably a bit too much, do you *really* need the
email to go out on the exact minute? The hosting companys also get a
little nervous about such frequent processes. 5 minutes is usually enough.
Sacs
[Back to original message]
|