PC Nerd Posted January 20, 2007 Share Posted January 20, 2007 hi guys.im creating a web game as many of you may be aware. And im looking to write a sort or automated script, or SMART script to actually play the game, from within the server.it would mainly act as a series of SQL querys to the mysql database, but would play, hundreds of users ( obviously not all at once. ) basically this is to stop 10 different players( when i [i]release[/i] tha game, from only havin g those 10 players to work with. id like to first start off with about 50 users. ) id be looking at running it like choosing the user from a random selection of 50, update your money by a random amount between two suitable values etc. my main issue is ... becauase this is an automated script, how can i get it to always be running or load its self every day at eg 6:00 am any suggestions would be much appeciated P.Sim not looking for too much code for the actual script to update users, more the way to run it effectively Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 20, 2007 Share Posted January 20, 2007 cron jobor advertise more and get more than 10 users ;) I started my game with only a few and it grew pretty quickly. Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted January 21, 2007 Author Share Posted January 21, 2007 but how would i get the script to run on the server regularly??? im just looking for some more ideas. Quote Link to comment Share on other sites More sharing options...
ShogunWarrior Posted January 21, 2007 Share Posted January 21, 2007 cron job Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted January 21, 2007 Author Share Posted January 21, 2007 ive looked at a few tutorials and they allt talk about unix and linux. im using windows and the php is running as an apahce module.im completely new to this.... could someone please window me a few pointers on how to do this??? Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 21, 2007 Share Posted January 21, 2007 Switch to Linux :)Googling Windows Cron Job turned up a lot of results. Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted January 21, 2007 Author Share Posted January 21, 2007 well my computer is dual partitioned with wioindows and linux but i cant run both at once. i thiknk i found how to do it ([url=http://www.evaria.com/v3/index/article/29/configuring-cron-jobs-on-windows.html]http://www.evaria.com/v3/index/article/29/configuring-cron-jobs-on-windows.html[/url])i load up internet explorer and run it as a scheduled task, and in advanced options i get it to run the particular script...... but would this only work if was logged in or the computer turned on, ( like would it skip a particular task if the computer wasnt turned on, or would it wait) Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 21, 2007 Share Posted January 21, 2007 [quote author=PC Nerd link=topic=123244.msg509336#msg509336 date=1169340563]like would it skip a particular task if the computer wasnt turned on, or would it wait[/quote]Usually computers can only function if they are on. Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted January 21, 2007 Author Share Posted January 21, 2007 YES I KNOW but if a sceduled task was to be run at midday, but i didnt turn on my computer until 1 pm, would the task be skipped or just run when i turned on the computer? Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 21, 2007 Share Posted January 21, 2007 I would assume it would wait until the next time it was scheduled for. I bet you could find out from some of those tutorials tho.edit: Why would you be turning the server off though? Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted January 21, 2007 Author Share Posted January 21, 2007 ok, thanks, ill look into it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.