Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help for running a large script 1

Status
Not open for further replies.

solex

Programmer
Feb 28, 2003
91
GB
Hi,

Im making a browser based game. And on every hr I want a script to run that will sort out scores etc. I have the script sorted out but don’t know how to make it run on the hr!

I have made a script that will check on each page requested if a hr process is needed, but this would slow down the users retrieval of the page as the script would have to run.

This would be a last resort, and I can’t run the script on my pc manually every hr.

Any thoughts?

+ Im running on tripod so have no admin level access to the servers in ne way.

Thanx SOLEX
 
Without having access to the server you're kinda limited from my experience.

Could you leave a browser open on your PC which has a page loaded with a javascript timer to reload it every hour?

-Rob
 
thanx,

but this is not possible, any thing else i could do?

SOLEX
 
This is really tough to do without being able to schedule cron jobs. You're right about setting a check on each page. That would definitely slow down retrieval. As an alternative, would it be feasible to just run the update script every time someone logs in? That way whenever a player logs in the scores get refreshed, you don't have to worry about the timer, etc. Just a thought.
 
If you're running the server too, and it's a linux or unix box... you may be able to fork the process, effectively running it asynchronously, so it doesn't slow down the loading.

An idea anyway.

-Rob
 
you could always run it at the end of the page and not the beginning, be sure to add a ignore_user_abort --BB
 
Thanx BB101, that sounds just wat i need, can you tell me how to do this on php?


thanx every one :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top