Jump to content
MakeWebGames

Paid mod idea, v2: Server friendly Cronjobs.


Recommended Posts

Posted

Say you got 10,000 players and only 500 are active. That's a lot of needless server CPU being used every time the cron files go off that can slow the server down, which can especially be bad if you don't have a dedicated server. The five minutes one can be so slow that you can't do anything until it's finished.

For cron_minute.php and cron_fivemins.php is there some way to move the Cronjobs to header.php and viewuser.php so the server only checks and if needed, updates the jail/hospital time for a player when he/she actually loads a page, and energy/HP/will on the first time he loads the page or another player views his profile, after 5, 10, 15...minutes after the hour and still gets the right amount back, so for example, if he next loads the page three hours later with out another player viewing his profile, he gains 100% HP and energy, and not what he would of normally got from one five minutes update?

If any one can make this, it would be well worth it being a paid mod. And only spiting out daily bank interest/street turns...to players who have loged in with in the last say three days, would be a plus.

Posted

Re: Paid mod idea, v2: Server friendly Cronjobs.

If you only have 500 active accounts and you have cron problems, you might want to stop using a free server. lol

Posted

Re: Paid mod idea, v2: Server friendly Cronjobs.

 

If you only have 500 active accounts and you have cron problems, you might want to stop using a free server. lol

LOL...ever thought about a clean up of the database maybe?

Posted

Re: Paid mod idea, v2: Server friendly Cronjobs.

 

If you only have 500 active accounts and you have cron problems' date=' you might want to stop using a free server. lol[/quote']

That was just an example. I got my own dedicated server.

Posted

Re: Paid mod idea, v2: Server friendly Cronjobs.

The Mc Code queries can also be designed smarter.

And as I've always told people, stop adding so many damn fields to your user table.

There are also a lot of fields in the usertable that are Int 11 even though they will never need that big. Moreso large VARCHAR fields, 200+ in length but never used more than 30 characters

There is really a ton of things you can to to improve Mc Code performance. There has been at least two different times I've avoided a server upgrade just by making some code adjustments.

Posted

Re: Paid mod idea, v2: Server friendly Cronjobs.

Another way you could do it is make the crons only run every 10 minutes and scale them so it works. Less times to do it for the same thing. In other words in energy update make it 2x the amount. As for making jail time work make jail times only be like 10, 20, 30, etc. For the brave update make it 2x as much than the 5 min and not use your five minutes. Sure it will be more in one query. But it should save the loads by quite a bit in the long run. 6 times instead of 12 for the five minute cron. 6 times instead of 60 times for the minute. Yea I think you should notice some difference. The only 'challenging' thing would be hospitalization but even that can be customized just make it 10x10x10xlevel or 20x20x20xlevel etc until you get desired results.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...