View Single Post
Old 02-25-2010, 04:14 PM   #3 (permalink)
Village Idiot
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by Arbaces View Post
Hello,

<offtopic>This community looks great and its my first topic so I should at least say I entered here because I've recently started to become more and more into web programming and decided to create an online game. Right now I'm digging all around the web to find things to start with. I have basic PHP & MySQL knowledge (and good Java and C), but that's why I want to learn along the way as I'm making something..

So, what I'm trying to make is a game similar to Cybernations, Travian and Hattrick, with ideas and concepts from many other games but brought online, in-browser.</offtopic>


The question that bugs me lately is: how will I make the server update itself (scheduled updates and scheduled script running, say from 10 to 10 hrs or something like it).

For example, as an exercise - say I'm making a page which I want from 5 to 5 minutes to update itself with some text (automatically, by the server). for ex:

i upload the page on a free hosting service with php and mysql - like FreeHostia
now the page is blank ..
//after ~12 minutes it shows up:
5 minutes passed! update [1]
5 minutes passed!

I hope you get it, I want to know how can I configure a server / a hosting service / everything , to run scripts on a scheduled time (scripts to update a db, process some algorithms etc). I need something I can start studying on.


Thanks in advance
-Arbaces
If you are on a linux server, Cron Jobs is what you are looking for. If you are on windows, Task Scheduler.
__________________

Village Idiot is offline  
Reply With Quote
The Following User Says Thank You to Village Idiot For This Useful Post:
Arbaces (02-25-2010)