Magnetic Bead Bracelet - Find jobs - Premium wordpress themes - Kamala - Wordpress Theme

PDA

View Full Version : How to update the db continuously?


YourChild
May 20th 2008, 3:14 pm
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?

jestep
May 20th 2008, 4:37 pm
What are you updating the database with? Generally it isn't ever necessary to update a database without having some change caused by users or another trigger-able factor.

Otherwise, you could use a crontab to run a php script, or cron and wget to run an actual page on your site.

Small Solutions
May 20th 2008, 4:40 pm
A cron-job would be your best solution, a file set to run every so often by the server to carry out different tasks; in your case update your database.

YourChild
May 20th 2008, 6:21 pm
I'm updating the database constantly because I got a chatroom running .. need to remove users etc

what on earth is a cron-job/cron-tab/wget? I've never heard of it before. I'll have to do some research to hook this up. Hopefully its not too crazy. thanks for the input.