PHP Code:
set_time_limit (0); 
I though this would allow the script to run until it was done, but it doesnt.