refresh page every day

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
acwe88
Forum Newbie
Posts: 24
Joined: Tue Nov 07, 2006 10:47 am

refresh page every day

Post by acwe88 »

Hi People,

Not sure if this is possible or not but can you make a php page refresh every day.

Basically i have a script which emails me (30 days in advance) when my domain names are up for renewal, But i have to run this script everyday MANUALLY.

so I am looking for some sort of function that runs my script everyday automatically

Thanks
Alex
User avatar
TheMoose
Forum Contributor
Posts: 351
Joined: Tue May 23, 2006 10:42 am

Post by TheMoose »

Check with your host to see if they allow cron jobs. It's basically a scheduled local execution of a PHP script, instead of having to refresh a page (requires keeping the browser open 24/7).
User avatar
Kadanis
Forum Contributor
Posts: 180
Joined: Tue Jun 20, 2006 8:55 am
Location: Dorset, UK
Contact:

Post by Kadanis »

don't know about an actual PHP script but the way I do it is to use CRON (if you're running on a Linux box). just set the command line for the Cron as

/usr/bin/php-cgi -q /{LOCATION_OF_PHP_FILE} (replace the obvious :D )

and then set the schedule. it will then run when ever you want and carry out what ever is in the script.


if you're running on Windows Server, I guess you could try and use Windows Scheduler, but I wouldn't know where to begin with that. Sorry
acwe88
Forum Newbie
Posts: 24
Joined: Tue Nov 07, 2006 10:47 am

Post by acwe88 »

Thats great

thanks for your help

Alex
iw2km
Forum Newbie
Posts: 1
Joined: Wed Jan 31, 2007 8:52 pm

re: refresh page every day

Post by iw2km »

If your hosting provider does not allow cron jobs you can try an online cron utility like http://www.wsscheduler.com.
Post Reply