Jump to content

Archived

This topic is now archived and is closed to further replies.

joecooper

Pause a script

Recommended Posts

what code would i need to pause a script for 48 hours then when the time is up, continue the script?

Share this post


Link to post
Share on other sites
You can use sleep(); like this:

while (true) {
// Do something here
sleep(seconds);
}

and replace sleep(seconds); with how many seconds you would like to pause the script

Share this post


Link to post
Share on other sites
I have got to know, what on earth would make you want to pause a script for 48 hours? Secondly pausing a script for 48 hours would exceed the default maximum execution time of 30 seconds so you either need to raise the limit or create a persistent connection.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.