Timer

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
Whear
Forum Newbie
Posts: 5
Joined: Tue Jan 20, 2009 5:30 pm

Timer

Post by Whear »

I've been looking for a way to execute a script every 24 hours with no outside variables.

Is there a way to do this in PHP?
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Re: Timer

Post by Burrito »

not sure what you mean 'no outside variables'

but have a look at cron
Whear
Forum Newbie
Posts: 5
Joined: Tue Jan 20, 2009 5:30 pm

Re: Timer

Post by Whear »

As in, if no one ever visited the website, it would still execute the commands regardless.
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Re: Timer

Post by Burrito »

yeah...then cron is what you want. You can just run your php from the cli.
Whear
Forum Newbie
Posts: 5
Joined: Tue Jan 20, 2009 5:30 pm

Re: Timer

Post by Whear »

I looked at that link yet I couldn't find exactly how to edit the cron file/setting
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Re: Timer

Post by Burrito »

google it then.
Post Reply