scheduling the server to do updates/jobs
View Single Post
02-25-2010, 04:14 PM
Join Date: Sep 2007
Originally Posted by
<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 
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
If you are on a linux server, Cron Jobs is what you are looking for. If you are on windows, Task Scheduler.
The Following User Says Thank You to Village Idiot For This Useful Post:
View Public Profile
Send a private message to Village Idiot
Find More Posts by Village Idiot