Hi..
There are currently 3 ways which I can think of to accomplish this.
Firstly, run your job from the console or a cron job.
Secondly, set your max_execution_time variable set up in your PHP configuration file to hours. This will enable you to execute a very time consuming php app via the web browser in real time.
Thirdly, its semi-realtime. You will need to save the state of the batch processing. For instance, if its web crawling and you have a table of 5000 entries:
call self to do crawl for entry 1, save this state into a database table. In this same output, there must be a meta refresh to call self.
Second call, script checks state table, perform crawl on second entry, save new state, output html page to refresh..and so on.
Hope this helps. You can always consider General Scripting for a job you'd like done.