Run PHP Script forever


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. ignore_user_abort(); // run script in background
  3. set_time_limit(0); // run script forever
  4. $interval=60*15; // do every 15 minutes...
  5. do{
  6. // add the script that has to be ran every 15 minutes here
  7. // ...
  8. sleep($interval); // wait 15 minutes
  9. }while(true);
  10. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.