Avoid Php script timeout

i have a task for kirby to perform. crunshing a lot of page objects (and i mean like 20k) and update each of them. yes. using kirby like a database is not the best idea but it worked well for now. since i need to store some files as well and be able to adjust the db-structure (blueprints in my case) easily.

obviously there is a php timeout after a while. i would like to just refresh my update skript after like 25 sek (toolkit timer) and continue. i can do this using html header and setting some params to track offset in my dataset.

echo "<meta http-equiv=\"refresh\" content=\"1\">\n";

i was wondering if calling the go() helper does the same? or is that kind of redirection still considered within the same execution timeframe. example

go($page->url().'/offset:'.$offset);

any other ideas how to do this properly with kirby?

What about this:

set_time_limit(0);

Please note that you should only ever use this line right before stuff that takes long. Just setting it to 0 (= disable the timeout) in general is not a good idea.

did try that too, but maybe i did it wrong or maybe host simply does not allow it?
php safe_mode is OFF so it should work in theory.

lets say i would end up with 15 min execution time, some time spend in waiting for post request and file io. how would you solve something like that?

It probably makes sense to run such a huge process from the command line instead. 15 minutes is way too long for most web servers, they will timeout even if PHP does not have a max execution time set.