views:

37

answers:

1

I need to create a web application using php, I had many users having appointments on different days and time. What I need is to send emails say 1 day, 6 hours and 1 hour before their respective appointments, cron job seems to be the option but how to run script at the specific times(when email has to be sent) for every user?

+2  A: 

You would create a script that determines if any emails need to be sent, then call that from cron every hour (or minute or whatever).

Scott Saunders
if at some time it happens that 100 of email need to be send. Will that cause the problem with the performance of the website?
nik
You should be able to send a few hundred emails without too much trouble. Follow the normal guidelines for optimizing your script and make sure your email server can handle it.
Scott Saunders