Reputation: 21
I am going to add one module to my project this module is about remainders.If today's date is a birthday of a person then a mail must be send to that person automatically at 9.00 A.M
Upvotes: 0
Views: 3292
Reputation: 25650
If your xampp is on Windows, you can use windows-schedulers to call a particular script (PHP script in your case, preferably by an URL), which checks the birthdays of all the users and sends them mail accordingly.
If your xampp is on Linux/Unix/etc, you can use cron-jobs, and rest is same!
There is also a third way, a third-party scheduler or say online-cron, which will remotely call yours script (php-page).
Example:
If you are doing the cron-settings of OS yourself, you can still let the configure as to whom to email in your system, rather than OS.
After all, a cron so is to do something repeatedly, in your case, its just calling your scripts, by an URL.
Now regarding the time settings, you can make the CRON call your script every our, and you php script will check the appropriate time, and fire the mails!
Reference: Send mail to different customer on their birthday
Hope this helps..
Upvotes: 1
Reputation: 161
You could always add a cron job/scheduled task that runs at 9 am and hits a service that checks if any mail needs to be sent out that day.
Upvotes: 1