You could try sending a php refresh header at the start of your script, but I guess you'll have the same problem with the static refresh thing. Anyways if you wanna play with it the syntax is something like :
header("refresh:3;url=./thepage.php");
where the 3 is the time, you can send this at the start of your script and it will still execute the rest of the script until the time you put in is up
hope this is of some help