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
Whear
Forum Newbie
Posts: 5 Joined: Tue Jan 20, 2009 5:30 pm
Post
by Whear » Wed Jan 21, 2009 8:43 pm
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?
Burrito
Spockulator
Posts: 4715 Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah
Post
by Burrito » Wed Jan 21, 2009 8:47 pm
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
Post
by Whear » Wed Jan 21, 2009 8:48 pm
As in, if no one ever visited the website, it would still execute the commands regardless.
Burrito
Spockulator
Posts: 4715 Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah
Post
by Burrito » Wed Jan 21, 2009 8:50 pm
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
Post
by Whear » Wed Jan 21, 2009 8:54 pm
I looked at that link yet I couldn't find exactly how to edit the cron file/setting
Burrito
Spockulator
Posts: 4715 Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah
Post
by Burrito » Wed Jan 21, 2009 8:56 pm