PDA

View Full Version : Sql And Php Need Help


smithygotlost
07-14-06, 08:10 AM
I have tryed to make my own rpg !! it has been sucessfull but i need to make to sql clock update itself without having to run a window that refreshes and update script every minute as this means i need a dedicated server !! can anyone help out ??

The clock needs to count down every minute every five minutes every ten minutes every hours every day

Any help would be greatfully taken

twoeyes
07-14-06, 12:28 PM
run a cron?

smithygotlost
07-14-06, 04:07 PM
erm not to sure about crons just learnt php and sql wbuilding the rpg lol !! had lots of help can you point me in the right direction ?

duesi
07-14-06, 04:34 PM
Well you need shell access to some unix server (you can also do this on windows using "at" or the task scheduler).

cron is a unix program that you can instruct to do things at given intervals (for example every minute). Normally, this is done using "lynx", which is a command line browser for unix:

http://techpatterns.com/forums/about399.html

Here you see how to set up a crontab:

http://www.adminschoice.com/docs/crontab.htm

Cheers!

smithygotlost
07-14-06, 04:37 PM
So using a cron would mean it would auto update itself without me ever touching it again ???

Christian
07-14-06, 04:38 PM
Yes.

And now for some pointless text because I said everything I wanned up there. ^^

smithygotlost
07-14-06, 04:39 PM
would anyone else have to activate it ? or just install and leave

Christian
07-14-06, 04:41 PM
You just set it up and it will run your script every X minutes, X hours, X days or what ever you set it for.

smithygotlost
07-14-06, 04:42 PM
cool lol glad there is a way i have had my pc on for 24/7 running 5 windows with timers on them lol !!

smithygotlost
07-14-06, 04:52 PM
getting confused can someone help me !! how do i write a cron then ?? and can someone write one for me as i really cant under stand how one works !! as i need to run the script every minute every 5 minutes every 10 minutes and every hour and once a day i would be so gratefull !! as i am completly baffled !

duesi
07-15-06, 01:49 PM
On Windows or on Unix?
For Unix, read the text I posted earlier, it desribes it pretty clearly.

On Windows, you can schedule tasks in the control panel (Shceduled tasks or something).

Cheers!

smithygotlost
07-15-06, 01:53 PM
The server is unix