Jump to content
MakeWebGames

Slower Crons


Jesse60905

Recommended Posts

Just a quick question. Since crons with multiple queries cause lots of server lag would it be worth it to use the sleep() function to stop a cron from working for 10 seconds to spread out the server lag?

I just want to know as I am thinking of implementing a feature that would create quite a few hundred queries per cron load (possibly). I can do it without that but I am trying to make it easier on me XD

Link to comment
Share on other sites

Re: Slower Crons

Technically it would take longer to run and could hit the 30 second limit unless you change the time limit.

No point It wouldn't make and difference.

If you are worried about too much load at once have parts running at different times.

Link to comment
Share on other sites

Re: Slower Crons

better yet put it in a portion that people who abuse glitches go to. Like make the setting so it LOOKS like it worked. Then make it sleep for a few seconds and send them to the hospital after like 10 seconds and making some sort of scream. Now that would be perfect along with changing the actual site and stuff. heh be like print("Did you really think I would let you abuse that?") show up

Link to comment
Share on other sites

Re: Slower Crons

 

Well I have scared the hell out of people with it...

 

Imagine running a script that said:

 

Hi

Then 15 seconds later plays Death Metal XD.

 

<?php
echo "hi";
sleep(15);
echo "<embed src=music/ARTISTNAME/SONGNAME.MUSICEXT />";
?>

 

You should run the php script then use some javascript to start the music. You shouldn't let a script run for longer than needs be.

Link to comment
Share on other sites

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