How to update the db continuously?

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
Yourchild
Forum Newbie
Posts: 16
Joined: Mon Jul 30, 2007 3:04 pm

How to update the db continuously?

Post by Yourchild »

I have a script that updates the database. Everytime a user logs in, it will update the database. I am trying to do the updating every few seconds however...waiting until a user logs in is kind of sloppy. Is there a way I can place this script on the server and have the server run the script continuously without having the website opened by anyone?
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: How to update the db continuously?

Post by califdon »

Yourchild wrote:I have a script that updates the database. Everytime a user logs in, it will update the database. I am trying to do the updating every few seconds however...waiting until a user logs in is kind of sloppy. Is there a way I can place this script on the server and have the server run the script continuously without having the website opened by anyone?
Offhand, I can't think of any justifiable reason to update a database when it is not being used. What data are you trying to update?
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: How to update the db continuously?

Post by s.dot »

In short, yes there is a way. Several of them!
But it's probably not the best solution you're looking for.
Describe your problem and we can help you come up with
a good solution.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: How to update the db continuously?

Post by Christopher »

Yourchild wrote:Is there a way I can place this script on the server and have the server run the script continuously without having the website opened by anyone?
You can run scripts and programs with cron on any schedule you want. What is your OS?
(#10850)
Post Reply