title: Keep alive solution for cron job
body: <p>I have a hosted websolution and a script that update information backend for the site.</p>
  
  <p>My webhost allows cron and I have made a script that wget's to every hour.</p>
  
  <p>The script checks the db-table with posts to update for the oldest updated post and update that. In the end of the script I use javascript refresh to do the same procedure again this time with the second oldest updated post and so on until all posts are run through. If I open the script in my browser it works fine but when my host sets up the cron the script does not continue after the javascrpt refresh.</p>
  
  <p>How can I solve this with another refresh solution that will work until the my statement stops it just by letting cron start the script?</p>
  
  <p>(I changed to this solution from one where all posts were updated in one pageload but since it started to time out I went with this)</p>
  
  <p>script.php</p>
  
  <pre><code>$limit=3600;       
  
  //Select the oldest updated post
  
  if($last_update&lt;$update_to_limit){ //check if the post was updated during this run
  
          // Script that update the post and below the java refresh that repeats the script.
  
      ?&gt;
          &lt;script type="text/javascript"&gt;
                  &lt;!--
                  window.location.href = "http://www.site.se/script.php"
                  //--&gt;
          &lt;/script&gt;
      &lt;?php
      }else{
          echo 'OK : All posts updated within the last : '.$limit.' s'; 
      }
  </code></pre>