title: running a script from cron every second
body: <p>i have a script which i am running from browser with meta refresh and it workd without any issue in browser but it will not work in cron so what i can do to run every second from cron?
  i know with sleep i can but i have to create several cron tab in cron job and every time i have to run the script</p>
  
  <p>with sleep how can i run this script every 5 sec.</p>
  
  <pre><code>&lt;meta http-equiv="refresh" content="5;url=test.php"&gt;
  &lt;?php
      $res = mysql_query("SELECT * FROM tableA where st='0' order by id asc LIMIT 1");
      $row = mysql_fetch_array($res);
  
      $link= $row['wl'];
  
      function getTitle($Url){
          $str = file_get_contents($Url);
          if(strlen($str)&gt;0){
          preg_match("/\&lt;\/td\&gt;&lt;\/tr\&gt;&lt;tr\&gt;&lt;td colspan\=2\&gt;(.*)\&lt;\/td\&gt;/",$str,$title);
  
              return $title[1];
          }
      }
      getTitle($link);
  ?&gt;
  </code></pre>