title: php never ending loop
body: <p>I need a function that executes by itself in php without the help of crone. I have come up with the following code that works for me well but as it is a never-ending loop will it cause any problem to my server or script, if so could you give me some suggestion or alternatives, please. Thanks.</p>
  <pre><code>$interval=60; //minutes
  set_time_limit(0);
  
  while (1){
      $now=time();
      #do the routine job, trigger a php function and what not.
      sleep($interval*60-(time()-$now));
  }
  </code></pre>