Jesse60905 Posted January 30, 2008 Share Posted January 30, 2008 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 Quote Link to comment Share on other sites More sharing options...
Will Posted January 30, 2008 Share Posted January 30, 2008 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. Quote Link to comment Share on other sites More sharing options...
Jesse60905 Posted January 30, 2008 Author Share Posted January 30, 2008 Re: Slower Crons True... Quote Link to comment Share on other sites More sharing options...
UCC Posted January 30, 2008 Share Posted January 30, 2008 Re: Slower Crons My experience with the SLEEP() function is completely negative. Always causes me more problems than good. Quote Link to comment Share on other sites More sharing options...
Jesse60905 Posted January 31, 2008 Author Share Posted January 31, 2008 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 />"; ?> Quote Link to comment Share on other sites More sharing options...
Godhand Posted January 31, 2008 Share Posted January 31, 2008 Re: Slower Crons lmao now that would be a good idea... That would be perfect for spoofing someone. Quote Link to comment Share on other sites More sharing options...
Jesse60905 Posted January 31, 2008 Author Share Posted January 31, 2008 Re: Slower Crons I know :-D Quote Link to comment Share on other sites More sharing options...
Godhand Posted January 31, 2008 Share Posted January 31, 2008 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 Quote Link to comment Share on other sites More sharing options...
Will Posted January 31, 2008 Share Posted January 31, 2008 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. Quote Link to comment Share on other sites More sharing options...
Jesse60905 Posted February 1, 2008 Author Share Posted February 1, 2008 Re: Slower Crons Not quite that good yet... Quote Link to comment Share on other sites More sharing options...
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.