title: run php script every 5 seconds
body: <p>I know that for running php script every time (seconds or minute) we can use Cron (job or tab) but cron has a 60 sec granularity so we are forced to have an infinite loop for running php script . For example we can write the code below to call it at the top of the script:</p>
  
  <pre><code>#!/bin/bash
  while [ true ]; do   
     #put php script here
  done
  </code></pre>
  
  <p>but it's illogical because we must change php execution time in php.ini so we have a lot of problems (Security , overflow , ... ) in server . well, what should we do exactly ?
  My question is how to run php script every 5 seconds that hasn't got problems in php execution time .</p>