Run code only on last page with Cron

Brent W

Well-known member
I don't understand your use-case for this?

What is it you are trying to achieve?
Cloudflare Edge Caching I guess :).
Correct. I want to essentially have a page rule like this:

CloudFlare Business only lets you choose 30 minutes as the lowest value for their Edge Cache. That length is too long for certain pages (forum listing, last thread page etc).

So I want to simply run php code on the last page of the thread every x minute in a cron so that I can purge the last page url of each thread.

I currently have a cron setup in crontab that does this forum homepage and forum listing every two minutes:

$identifier = $api->identifier('');
$files = [
$result = $api->purge_files($identifier,$files);