Updating database every 15 minutes.

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
silverpanda
Forum Newbie
Posts: 3
Joined: Sat Mar 22, 2008 7:21 am

Updating database every 15 minutes.

Post by silverpanda »

Hi, developers.

I have a problem while developing a website.

The database of this site should be updated every 15 minutes regardless clients visit or not.
how can the database be updated periodically without clients' visiting of pages?
I am wondering cPanel has such ability. but not sure and can't find such ability.

Please help.
Thank you.
tabatsoy
Forum Commoner
Posts: 29
Joined: Thu Mar 13, 2008 10:14 am

Re: Updating database every 15 minutes.

Post by tabatsoy »

hi!
i'm also new to php but i suggest you put a counter or timer that for every 15mins. you should run a query.
i hope that helps
silverpanda
Forum Newbie
Posts: 3
Joined: Sat Mar 22, 2008 7:21 am

Re: Updating database every 15 minutes.

Post by silverpanda »

Sorry, but i asked how to update database whether or not anyone visit the website.
every 15 minutes.

anyway, thank you for your reply.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Updating database every 15 minutes.

Post by pickle »

You want a cron job that runs a PHP/Perl/server-side script every 15 minutes. That script is what will update the database. As far as I know, CPanel uses the term "cron job", as it should.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Updating database every 15 minutes.

Post by califdon »

silverpanda wrote:Hi, developers.

I have a problem while developing a website.

The database of this site should be updated every 15 minutes regardless clients visit or not.
how can the database be updated periodically without clients' visiting of pages?
I am wondering cPanel has such ability. but not sure and can't find such ability.

Please help.
Thank you.
Somehow the idea of "updating a database" when there has been no activity seems quite odd to me. Maybe you have a good reason for doing this, but I'd be interested to know why you need to do it. What is being updated??

EDIT: You just posted the same question 2 minutes before this one. That is really discouraged here!
Post Reply