How to make a script run automatically?

3

I am making a script to send emails to subscribers, such as a newsletter , however I need it to run automatically and this hourly.

As my operating system is Windows and initially I want to test this script locally, I searched and saw that a task should be scheduled that would execute this script , but I have no idea how to do it.

In addition, I have to send the script every 100 hours, that is, if there are 300 subscribers, in the first hour the script will send 100 emails and its execution will be interrupted, the second time execution will resume and 100 more emails will be sent and so on until all subscribers receive > emails .

So far I've been able to send everyone, but I'm not able to control the number of emails sent per hour, I'd like you to help me by giving me a hint or idea how to do it.

Thank you

    
asked by anonymous 22.07.2014 / 05:46

1 answer

3

To send in 100 in 100 you will have to program this in the script you use to select 100 records. On windows I do not know how to do this, but I recommend you use Linux (Hosting) and use the CRON option you have in PHPMyadmin. There you will program in how many hours you want to send and you should put the path of the file that should execute, ex: /home/public_html/files/file.php

    
22.07.2014 / 06:05