Error on Cron Job when Cloudfare activated

Hi i have a currency module that i use in Cron job for update currency . its a URL.
curl -s "https://www.mydomain.com/?route=extension/eitscurrencyupdaterate/eitscurrencyupdate/refreshCurrencyReate"

It works fine without Cloudflare ativated i get email Successes when its done. 1 time per day.

when Cloud fare is activated i get this message from cron job.

<!doctype html>

One moment, please... body { background: #F6F7F8; color: #303131; font-family: sans-serif; margin-top: 45vh; text-align: center; }

Please wait while your request is being verified...

Any idea whats makaing this issue?

thanks

That is because Cloudflare is checking the request to make sure it is not a bot. You will have to make a rule to have the request bypass Cloudflare.

2 Likes

Witch rule should i apply to that URL? under Page Rules.
Pick a Setting (required)

Thanks

This message is actually not from any Cloudflare product, but from a firewall solution adopted by many hosting providers. You can create a Cloudflare Cache Rule to minimize its impact by setting caching for 302 responses to the URL on the cronjob to “no-cache”. Though of course in your case I’d suggest you talk to your hosting provider to see if they let you fine tune the rules and let your cronjob through the firewall to begin with.

2 Likes