Thanks, it's something that needs running regularly but only when a user manually wants to so scheduling it with a cron job isn't really needed.
I have set the PHP timeout which works on my own server but not all servers are going to take kindly to that. I'm just not sure how in PHP I can get it to run a batch and then reload the page and run another batch so the script runs for less than 30 seconds then waits 30 seconds before running another batch for 30 seconds.
My first try was to process a batch of 250 records which it can easily do in less than 30 seconds, at the end of the batch I used header("location: mypage.php?start_rec=250"); so that when the page reloaded it would look at the query string and use the start_rec in the MySQL limit to load the next batch or records.
I worked all the way through my script and the logic looked to me like it should work but as the page is redirecting to itself Firefox seemed to think this was an infinite loop and killed it.
I'm just not sure how I can get a PHP script to run and then reload itself to run the next batch without the browser objecting - or is a header redirect not the thing to use?