Reputation: 34
I am trying to create a website that needs to send Email every day to the mail addresses stored in mysql. After I googling I found cron concept can be used to do this. I need to know which is the best way to do this. If cron is the best one explain me how can i create the cron file in php. I am using XAMPP in windows.
Thanks in advance...
Upvotes: 1
Views: 868
Reputation: 1677
You need to setup something called a CRON job on your server.
If you are using a a hosting service, this can be done in control panel.
If you are using control panel, good explanation here:
http://kb.enoi.se/setting-up-cron-jobs-scheduled-tasks-from-the-control-panel/
Upvotes: 0
Reputation: 7675
You need a simple php file for sending mail with your specific logic. Then you just call that php file via cron job. The process depends on your hosting server. So first decide about hosting server.
Upvotes: 0
Reputation: 776
for windows you may need to try this,
http://windows.microsoft.com/en-us/windows/schedule-task#1TC=windows-7
or check this one, contains more detail
http://support.microsoft.com/kb/308569
Upvotes: 1
Reputation: 490
All you need to do is write the php script that preforms the actions you wish, then create a cron job that executes the script. Check out this link https://drupal.org/node/31506, while it pretains to drupal the concepts should apply just fine for your case.
Upvotes: 0