Since it's regular it sounds like what you want is a cron job (search for that).
On the other hand, since you want to use a browser to view the progress, use
set_time_limit to regularly reset the timeout limit while running through the entire batch and periodically produce output (to prevent the page loading from timing out).
Or, in a modification of the previous idea, have the browser use JavaScript to periodically query the server for the current status and use the response to update the progress page.