Jump to content
MakeWebGames

Recommended Posts

Posted

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

  • Replies 81
  • Created
  • Last Reply

Top Posters In This Topic

Posted

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.

Posted

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 ;)

Posted

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

  • 2 weeks later...
Posted

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.

Posted

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.

Posted

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 ;)

  • 2 weeks later...
Posted

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

Posted

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 ;)

  • 7 months later...
Posted
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! :)

Posted

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

  • 1 month later...
Posted

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

  • 2 weeks later...
Posted

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

  • 1 month later...
Posted

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.

  • 2 weeks later...
Posted

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

Posted

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.

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