AlabamaHit Posted March 5, 2009 Posted March 5, 2009 Re: [any version] Removal of 1 minute crons Total users online within the last 1 mins: 26 Total users online within the last 15 mins: 80 Total users online within the last 1 hours: 127 Total users online within the last 24 hours: 342 I would never use this. Crons are way to go. And those everyday..Not the most recorded. Game i would say is mostly successful cause it was never mentioned on here. lol Quote
Haunted Dawg Posted March 5, 2009 Author Posted March 5, 2009 Re: [any version] Removal of 1 minute crons Got a better way? Post it then! Quote
AlabamaHit Posted March 5, 2009 Posted March 5, 2009 Re: [any version] Removal of 1 minute crons Better way is a CRON from what I have been reading that is what everyone is saying.... Quote
Haunted Dawg Posted March 5, 2009 Author Posted March 5, 2009 Re: [any version] Removal of 1 minute crons A cron running every minute uses way much resource of your CPU usage. Quote
POG1 Posted March 5, 2009 Posted March 5, 2009 Re: [any version] Removal of 1 minute crons A better way is to get rid of any sort of 1min "cron". Just use timestamps on hospital and jail.. Quote
AlabamaHit Posted March 5, 2009 Posted March 5, 2009 Re: [any version] Removal of 1 minute crons How can a time stamp be better? It runs everytime anyone loads a page. So 80 online clicking pages like crazy just playing the game they ahve a crap load of quersy running. Sorry but there is no way that running a query Every Load of a page by Every person or Even just that person is better than only running that query 1 time a minute. So lets see.......if 80 people clicked 1 page every minute...that means that query ran 80 different tiem in 1 minute On a cron it runs 1 time... Even with the query only selecting through it still has to check. so its stull running CPU its Imposible for this way to be better. Quote
POG1 Posted March 5, 2009 Posted March 5, 2009 Re: [any version] Removal of 1 minute crons I think you read wrong.. http://en.wikipedia.org/wiki/Unix_time If you wanted to put someone in hospital for 15 mins you would work out when they come out of hospital. Here is some code to explain it a bit better. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Zero-Affect Posted March 6, 2009 Posted March 6, 2009 Re: [any version] Removal of 1 minute crons very good example pog1 Quote
dementor Posted March 6, 2009 Posted March 6, 2009 Re: [any version] Removal of 1 minute crons Total users online within the last 1 mins: 26 Total users online within the last 15 mins: 80 Total users online within the last 1 hours: 127 Total users online within the last 24 hours: 342 I would never use this. Crons are way to go. And those everyday..Not the most recorded. Game i would say is mostly successful cause it was never mentioned on here. lol What games that ? Quote
AlabamaHit Posted March 6, 2009 Posted March 6, 2009 Re: [any version] Removal of 1 minute crons Thanks for explainging that agian POG1...BUt I did understand 100% I wrote something like this 2 or 3 months ago. ANd its slow.... What I mean by that is...Every page load your checking that code..and in case of example You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Your loading that every page click....Like i was saying 20 players online 20 players every time they click the database is checked for that... Now on a Cron its only check when the cron is ran. Now I agree a 1 minute cron is not the best option. But I would not go with this still....Guess I didnt explain good.. Cause i really don't explain good... Best thing to do is to remove the 1 minute cron and add it to the 5 minute cron. THen you only have it running every 5 mintues....Now. That we have it on 5 minute cron Can you still honestly say/think. That running a check of the hosp/jail tiem every 5 minute. Is Slower than yoru way(checking eery click of a page by every single person online) Now i can see this faster if you onloy hoave 10 onlin AND you have 2000 people signed up Cuase in that factor your having 2000 checks rather than 10 but that can be fixed with somethign that eveyrone should ahve done anyway with adding time on the end of query WHERE laston < time() - 360; Quote
dementor Posted March 6, 2009 Posted March 6, 2009 Re: [any version] Removal of 1 minute crons alabama answer my question please :-D Quote
Haunted Dawg Posted March 6, 2009 Author Posted March 6, 2009 Re: [any version] Removal of 1 minute crons I would also like to know the exact same question as dementor. If you don't reply leave my thread alone ;) Quote
Cronus Posted March 6, 2009 Posted March 6, 2009 Re: [any version] Removal of 1 minute crons There is actually a much better way to do this, that takes absolutely no strain on your server whatsoever. I'll post something about it maybe in a day or two. Quote
AlabamaHit Posted March 7, 2009 Posted March 7, 2009 Re: [any version] Removal of 1 minute crons dementor please read my post.... Also agree with Killah on that....if its not about this topic please post another thread...Please keep in on this topic... Quote
dementor Posted March 7, 2009 Posted March 7, 2009 Re: [any version] Removal of 1 minute crons I dont see a answer to my question :s Quote
Zero-Affect Posted March 7, 2009 Posted March 7, 2009 Re: [any version] Removal of 1 minute crons I would also like to know the exact same question as dementor. If you don't reply leave my thread alone ;) sounds rather threatening to me There is actually a much better way to do this, that takes absolutely no strain on your server whatsoever. I'll post something about it maybe in a day or two. I look forward to reading your reply/post Cronus Quote
POG1 Posted March 7, 2009 Posted March 7, 2009 Re: [any version] Removal of 1 minute crons @ alabama. In your game you will be checking for people in hospital with something like this. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I don't see how it will be faster to run a cron to decrement the values every minute, when you can just use something like this. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. So your telling me instead of using a single time function you would rather use lengthy crons.. Quote
Zero-Affect Posted March 7, 2009 Posted March 7, 2009 Re: [any version] Removal of 1 minute crons good point but there would really be no point in a extra file it would be simple enough to just add the script in anything relating to or adding someone to hospital. im sure horizon game engine will run something along these lines Quote
AlabamaHit Posted March 7, 2009 Posted March 7, 2009 Re: [any version] Removal of 1 minute crons @ alabama. In your game you will be checking for people in hospital with something like this. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I don't see how it will be faster to run a cron to decrement the values every minute, when you can just use something like this. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. So your telling me instead of using a single time function you would rather use lengthy crons.. thats isnt even in the cron.. and you just proved my point...yours runs the function every time anyone loads any page... and cron runs it once a minute.. and if you know what your doing. .Your cron will be clean and efficient Not Long...my minute cron has 2 querys..........for example. I run 2 querys every min. Your way would run those querys Every load of every page by every person Its Impossible for your way here to be better.. Impossible. Your way only does it to be people that needs if...God i hope thats not the responce. Cuase mine only checks ones that needs it to.. so don't blame it on a lengthy cron..If they cant clean up their cron thats there fault... And i already said this would be ok for a small game. but alot of people online at one time..I see it as impossible. I would break it down like last time showing numbers of querys ran..but no point...cause you just looked right past that. Quote
POG1 Posted March 7, 2009 Posted March 7, 2009 Re: [any version] Removal of 1 minute crons It seems as your chatting out your ass. Quote
POG1 Posted March 7, 2009 Posted March 7, 2009 Re: [any version] Removal of 1 minute crons Your wrong. Someone is put into hospital for an hour, so 60 mins. With a cron it would take 1 query to add the number into the database then another 60 queries to decrement the value. With a total of61 queries. With the method i suggested it would take 1 query to update them into the database resulting in 1 query in total. Thats almost a 100% reduction in queries.. Quote
Haunted Dawg Posted March 7, 2009 Author Posted March 7, 2009 Re: [any version] Removal of 1 minute crons Pog1 leave him. Let him be. Quote
ReaSonZ Posted March 10, 2009 Posted March 10, 2009 Re: [any version] Removal of 1 minute crons wots the point ? Well, let's start off with the querys: Now here is the file: still in a file and you running more querys ? Quote
Eternal Posted March 10, 2009 Posted March 10, 2009 Re: [any version] Removal of 1 minute crons wots the point ? Well, let's start off with the querys: Now here is the file: still in a file and you running more querys ? The point is to provide a solution to cut down cron activity Most servers hate crons most sites just hate mccodes cause of the crons. So what is trying to be achieved here is providing a solution to the people who don't have access to those crons Also attempting to maximize the efficiency of the MCC source so a faster yet better solution is provided. If you don't like it don't use it simple shit. <?>Eternal Quote
Zero-Affect Posted March 10, 2009 Posted March 10, 2009 Re: [any version] Removal of 1 minute crons I recently started using time stamp for accurate time keeping it's actually better for some things than cron, well actually most things. Good job Kyle and Pog1 skeptics i suggest you keep your nose out of things you don't understand Quote
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.