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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

more help with a large script

Status
Not open for further replies.

solex

Programmer
Joined
Feb 28, 2003
Messages
91
Location
GB
Hi ,

I asked b4

“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.”

But now I am moving to a new host and they have c panel 6 and this has cron jobs on it, and this was suggested b4

“GiffordS
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

I don’t know what cron jobs are, and as it’s a php script that it is processing, I thought that one of you lovely people could help.

Thanx in advance

SOLEX
 
Since you are on tripod, you can't set a cron job. Just so you know, you don't need "admin" (or in your case root) access to set up a cron job. :) Cron is a system (very simply system I might add) that wakes up every minute to check to see if it has something to run, if it does, it runs it.

Hrm. To run this every hour would be difficult on your host ... The only thing I can suggest besides finding a different host would be to see if you can find a puesdo-event system. I know they exist, but they aren't easy to come by.

I am Comptia A+ Certified
 
But now I am moving to a new host and they have c panel 6 and this has cron jobs on it, and this was suggested b4.

why would this be a strain on the host?

thanx SOLEX
 
It isn't so much a strain as it is problem causing for a large free host like lycos. Many paid hosts limit (or should anyway) the number of users per server and this takes away the possibility of system resources being hogged by people trying to run things more often than they should.

I am Comptia A+ Certified
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top