timer question..

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
EQuAliZer
Forum Newbie
Posts: 2
Joined: Sun Jul 06, 2003 3:42 am

timer question..

Post by EQuAliZer »

hi..
i was wondering, how do i make a timer that execute an update every X minutes..

i have tried something very lame.. a script that will update once in 5 minutes.
<?

$d=date("i");
if (eregi(5, $d))
{
#script content
}
?>

the problem is.. it wont "auto update", because i have to click on the file in order to update..
i hope you understood me.. thanks for everyone who helps.
User avatar
m@ndio
Forum Regular
Posts: 163
Joined: Fri Jun 06, 2003 12:09 pm
Location: UK

Post by m@ndio »

If you have access to cron jobs on your server you can set one up to run a script every X days at X time...
EQuAliZer
Forum Newbie
Posts: 2
Joined: Sun Jul 06, 2003 3:42 am

Post by EQuAliZer »

no i dont have access to cron..
User avatar
m@ndio
Forum Regular
Posts: 163
Joined: Fri Jun 06, 2003 12:09 pm
Location: UK

Post by m@ndio »

I really don't think there is any other way... unless you write a windows application to ping the script whenever you want it...
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Sure there is!


If you're running windows: http://www.devnetwork.net/forums/viewto ... ndows+cron
Post Reply