2

I am using a shared windows hosting in which sending 120 mails/hour is allowed though php code. i have a php page to send emails more than 200 mails at a time.But i want to run the page, after every hour(scheduled task). I will split the emails(in 100s) and want send automatically after every hour.

How is this possible in php to run a php page after every hour ?

Thanks

hakre
  • 193,403
  • 52
  • 435
  • 836
logan
  • 7,946
  • 36
  • 114
  • 185
  • 1
    cronjob or what ever the windows equivalent is. why would would you ever host on windows? –  Feb 12 '12 at 07:29
  • 1
    You can set this up using Plesk - at least that's what I'm presuming you're using because that seems to be the only major panel that actively supports a separate build for Windows. – Westie Feb 12 '12 at 12:10

3 Answers3

8

Use PHP Cron Jobs with cPanel

cPanel Simple Cron

you can get started with the simple cron tool built into cPanel. The url for it is:

https://www.yoursite.com/page.php

The command to run:

/usr/local/bin/php -f /home/(username)/public_html/page.php

Next you'll want to select an option from all the select boxes. Remember to select an option in each box. If you want something to run every hour, select Minute: 60; Hour:Every; Day: Every; Month: Every; Weekday: Every;

Click save and you are all set! You'll get an email every time the cron job runs, but if you don't want to get it - put :blackhole: into the output email field at the top.

thecodedeveloper.com
  • 3,220
  • 5
  • 36
  • 67
5

Use a script on Google AppEngine to "ping" yours (Scheduled Tasks to be more precise). It's free to use.

JJJ
  • 32,902
  • 20
  • 89
  • 102
Fahim Parkar
  • 30,974
  • 45
  • 160
  • 276
1

You can schedule a task in Windows - control panel->administrative tools is where you find task scheduler.

Ed Heal
  • 59,252
  • 17
  • 87
  • 127