Long running CRON job is stopped by Cloudflare


We need to run CRON job which last at least 4 hours. But this CRON job is automatically stopped by Cloudflare(!) after maybe 30 minutes. When we turn off Cloudflare, it works great. How can we run this CRON job within Cloudflare? We use cPanel.

Thank you,

Cloudflare cannot stop that in the first place as they don’t have access to your server. If you “start” your job via an HTTP request, then you could run into a 524, but A) you shouldn’t do that to begin with and B) that would time out after a minute already, not 30 minutes.

Why do you think Cloudflare is involved at all?

We use CRON as cPanel has shown in documentation (How To Configure a Cron Job | cPanel Blog)

This CRON run 30 minutes because we have done some things which “fooled” Cloudflare so this script can run more than 1 minute. But least for 30 minutes, when we turn off Cloudflare this script works pretty fine thats the reason why Cloudflare is involved in this.

That seems to be a regular cron job then and Cloudflare would not be involved, unless you are calling a proxied host, where the one minute limit still applies.

That might be the exact issue then.

Bottom line, make sure your request is not making a call to a proxied hostname which lasts longer than 100 seconds and you should be fine. If that is not the case Cloudflare would not be involved though.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.