devWhiz Posted June 3, 2011 Share Posted June 3, 2011 Example script, <?php $Var = "test"; for($i=1; $i!=-1; $i++) { echo "#$i: ".$Var."\n"; } ?> How could I make that script pause for 15 minutes for every 30 minutes to 1 hour, have it randomly choose how long to wait before it pauses, and then wait for 15-30 minutes Quote Link to comment https://forums.phpfreaks.com/topic/238267-how-to-get-a-script-to-pause-every-x-minutes-for-x-minutes/ Share on other sites More sharing options...
RussellReal Posted June 3, 2011 Share Posted June 3, 2011 you cannot do this through a web server, however you could do this through CLI, and you would use the sleep function. Quote Link to comment https://forums.phpfreaks.com/topic/238267-how-to-get-a-script-to-pause-every-x-minutes-for-x-minutes/#findComment-1224435 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.