How to get my long-running, many-redirects script to bypass “page isnt redirecting properly” error?


I have a script that takes about 5 minutes and must be run many times. So, I have it set up on CF Administrator as a scheduled task. (even though it’s a php script) Basically this:

$n = $_GET['n'];
// do a bunch of stuff, with $n

$url = ''.$n +1;
header("Location: $url");

And so on, for about 350 iterations. It usually gets through 20-50 iterations, before "page isnt redirecting properly".

If i do this, manually:
<script>'', '_blank');</script>
It works fine, opens all the tabs, runs all the scripts, no problem.

This script is on wordpress, but it’s not really doing all the normal wp stuff, it’s only on wp for convenience.

Doug Cassidy 3 months 0 Answers 7 views 0

Leave an answer