D T K Posted April 7, 2009 Posted April 7, 2009 Re: [any version] Removal of 1 minute crons Cab someone help me currently im running on ej,am and they have banned 1minute Crons and this mod wont work for me is there anyone to make it work Quote
AlabamaHit Posted April 7, 2009 Posted April 7, 2009 Re: [any version] Removal of 1 minute crons I think i speak for most of CE... I can't be bothered to help someone fix a game that they will profit from when they can not even be bothered to Pay for hosting and/or domain name. Quote
Zero-Affect Posted April 8, 2009 Posted April 8, 2009 Re: [any version] Removal of 1 minute crons Agreed Quote
Magictallguy Posted April 8, 2009 Posted April 8, 2009 Re: [any version] Removal of 1 minute crons Thanks to Haunted_Dawg's (Kyle's) code, I have conquered crons! xD I've got the solution to all crons, not just 1 minute.. They go by seconds, There's a clue ;) Quote
Lithium Posted April 8, 2009 Posted April 8, 2009 Re: [any version] Removal of 1 minute crons Thanks to Haunted_Dawg's (Kyle's) code, I have conquered crons! xD I've got the solution to all crons, not just 1 minute.. They go by seconds, There's a clue ;) timestamped actions can be an option, yet it will increase the load more than crons, unless you close open connections, even though the load is higher than crons. One other option... are the mysql events :P Quote
MyGunWars Posted April 22, 2009 Posted April 22, 2009 Re: [any version] Removal of 1 minute crons Helped By Magictallguy: Add In header.php: Make sure it's at least under the function userdata(). You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. SQL: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. File(cron_file.php): You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Magictallguy Posted April 23, 2009 Posted April 23, 2009 Re: [any version] Removal of 1 minute crons Thanks to Haunted_Dawg's (Kyle's) code, I have conquered crons! xD I've got the solution to all crons, not just 1 minute.. They go by seconds, There's a clue ;) timestamped actions can be an option, yet it will increase the load more than crons, unless you close open connections, even though the load is higher than crons. One other option... are the mysql events :P While this is true - not all servers have MySQL 6.* yet. The developers of MySQL strongly recommend that you do not use MySQL 6.* until there is a stable release. Quote
Lithium Posted April 23, 2009 Posted April 23, 2009 Re: [any version] Removal of 1 minute crons Thanks to Haunted_Dawg's (Kyle's) code, I have conquered crons! xD I've got the solution to all crons, not just 1 minute.. They go by seconds, There's a clue ;) timestamped actions can be an option, yet it will increase the load more than crons, unless you close open connections, even though the load is higher than crons. One other option... are the mysql events :P While this is true - not all servers have MySQL 6.* yet. The developers of MySQL strongly recommend that you do not use MySQL 6.* until there is a stable release. @MTG - just a small correction... events were introduced in 5.1, working with minor glitches (or none if you can do some workarounds), as of version 6, i'm a bit away of current status yet i can pretty much figure as you say... it will come with the glitches fixed up and a lot of new goodies ;) Quote
mj12 Posted May 8, 2009 Posted May 8, 2009 Hybrid Solution? Using the time stamp with crons is to me the faster solution. For example: In your minute cron you can do this, but you will need to add the time when the user is supposed to come out of the hospital. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Then on the other pages all you would need to check is the hospital table to see whether the user is there or not. The delete query would only run if the current time is greater than the hospital time i.e the user has been in the hospital long enough. I think you folks also underestimate how fast mysql does things. i've seen in excess of 14,000 queries, inserts being executed in less than a second on a shared server. My 2 cents Quote
Lithium Posted May 8, 2009 Posted May 8, 2009 Re: [any version] Removal of 1 minute crons 14K queries executed in less than a second... but then... query cache is a b*tch, yet it is usefull, it tends to cause massive bottlenecks. This is why it goes fast. setting up a low query cache doesn't only avoids bottlenecks also, free's up the use of cpu. And unbelievebly... it still processes 14K+ queries in less than a second! My 2 cents ;) Quote
GodLovesEcstasy Posted January 1, 2010 Posted January 1, 2010 Helped By Magictallguy: Add In header.php: Make sure it's at least under the function userdata(). You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. SQL: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. File(cron_file.php): You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Hey there. I tried doing exactly as this says, but it doesn't seem to work :/ Any support would be appreciated! :) Quote
p_T_s Posted January 3, 2010 Posted January 3, 2010 Just make sure the file name is the same You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Make the file crons_file Above it says cron_file so just change that Quote
CJ - Twitch Posted February 28, 2010 Posted February 28, 2010 It doesn't work... Any ideas? Warning: include_once(/crons_file.php) [function.include-once]: failed to open stream: No such file or directory in /*****/header.php on line 69 Warning: include_once() [function.include]: Failed opening '/crons_file.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /*****/header.php on line 69 Quote
wrx Posted February 28, 2010 Posted February 28, 2010 Failed opening '/crons_file.php it cant open/find crons_file.php check path of file for include wrx Quote
wrx Posted February 28, 2010 Posted February 28, 2010 I don't know why lol. Its there. check how you linked it in your file maybe incorrect syntax/mispelling of file etc... can you manually open the file ie ..... http://www.yourdomain.com/crons_file.php wrx Quote
Djkanna Posted March 6, 2010 Posted March 6, 2010 include_once (dirname (__file__) .'/crons_file.php'); Quote
badbull Posted March 18, 2010 Posted March 18, 2010 im a noob to coding (but trying to learn). ive installed the code that MyGunWars listed, and after a few changes got it working (i think, at least i got it to stop showing errors and load a game page lol). one thing i am wondering tho, is how do i get it to run the cron files? im not sure which lines of code to move from the cron files to this script and where they should be placed. any help would be greatly appreciated Quote
Gungneer Posted May 10, 2010 Posted May 10, 2010 Normally if I wasn't feeling so lazy, I would recode shit so it based it on timestamps (mainly for jail and hospital) but since i AM lazy, I jused used the origin script from here, and modded it to work for ALL crons. XD The only thing I've left out just now is teh validate crap, appart from that, it seems to be running fine... Here's my codes... Note: As with all my posts made so far, I don't expect this to work, and don't care if it does or doesn't... I'm really still not sure why I'm posting this crap here. XD ENJOY! Also, ALL credit goes to the genius who started this thread. updates.sql [mysql] CREATE TABLE IF NOT EXISTS `updates` ( `name` varchar(255) NOT NULL default '', `last` int(255) NOT NULL default '60' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `updates` (`name`, `last`) VALUES ('1min', 1273503540), ('5min', 1273503300), ('1hour', 1273500000), ('1day', 1273449600); [/mysql] Add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. RIGHT under You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. in globals.php crons.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. cron_minute.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. cron_fivemins.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. cron_hour.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. cron_day.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Haunted Dawg Posted May 13, 2010 Author Posted May 13, 2010 You can shorten most of those queries with the LEAST() SQL function. Quote
Oo-Savage-oO Posted May 21, 2010 Posted May 21, 2010 I dont know how to fix this but I see a error in Hawnted-Dawg's code it doesnt update the people in the hosp i mean like in main menu there is Hospital(0) it doent change to Hospital(1) even if there is someone in it same goes for jail Quote
corruptcity || skalman Posted May 21, 2010 Posted May 21, 2010 mate its you ive used this b4 and had no probs with it Quote
Curt Posted May 22, 2010 Posted May 22, 2010 lol...the error in the main menu with the people not showing in the jail or hospital has nothing to do with this mod. I believe that is a small coding issue with mccodes itself...but not sure on that. Also I use this currently to update a few things on my game and it works perfect. nice work. 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.