Jump to content

Stop a PHP Script at a time interval


dani33l_87
Go to solution Solved by trq,

Recommended Posts

HI,

 

I was trying do add a function to my script to stop each 10 seconds, using max_execution_time. Apparently is not working and most probably from the php.ini file, that I can t change because I want for the others script to run normally.

 

How can I write a function inside a php file to stop everything after 10 seconds.

 

Or how can I make a script to stop after 100 processed items and start again after 30 seconds. I need to stop this file somehow.

 

 

$processedItems++;
e("{$processedIItems} of {$buffer->totalItems} (".sprintf("%.2f", $processedItems/$buffer->totalItems*100)."%)\r");
Edited by dani33l_87
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

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

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.