WordPress Cron Job Intercepted by the Cloudflare Cache- Need help ASAP

#1

Hello,

We need some real urgent help.

We are putting together a multisite solution that relies on the Cron Jobs.

The solution we implement, relies on https://ourdomain.com/subsite/wp-cron.php.

We have put https://ourdomain.com/subsite/wp-cron.php in the browser, and it triggers autoresponders etc just fine.

We then put the cron jobs in the server Cron Tab, they seem trigger fine, but not really hitting our multisite subsites to get the real tasks (like sending autoresponders) executed. Yes, they are the same URLs that when put in the browser address bar, can manually trigger execution.

We then moved the cron jobs to cron-job.org which saves much more detailed responses for us. And we got this:

X-Cache: HIT,

The developer whose solution relies on this cron job, looked into this and said: it means the call to wp-cron.php is intercepted by your cloudflare cache and does not reach the blog. Ask the tech to add an exception to that file.

We then researched on line, and read that for Cloudflare, if there is such a conflict, we should just create another subdomain, put the cron jobs under it, and then totally bypass Cloudflare.

But this does not seem viable for us because we are on a multisite. Each subsite’s cron job has to be set up separately. We have to use https://ourdomain.com/subsite/wp-cron.php

I added some page rules, telling the cache to bypass https://.ourdomain.com//wp-cron.php. The cron job save response still shows X-Cache: HIT, And there is no improvement.

What shall we do? Does it mean we have to leave Cloudflare to make this work?

Jing

What about CRON and CLOUDFLARE?
#2

X-Cache is not a Cloudflare header. That’s on the server. Cloudflare’s cache header is Cf-Cache-Status.

1 Like
#3

sdayman, if so, how to resolve this issue. What should I tell the Server company to do?

And this is the full response we get.

Date: Thu, 09 May 2019 17:41:43 GMT

Content-Type: text/html; charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive Set-Cookie: __cfduid=xxxxxxxxxxxxxxxxxxxx; expires=Fri, 08-May-20 17:41:43 GMT; path=/; domain=.ourdomain.com; HttpOnly Cache-Control: max-age=2592000 Expires: Sat, 08 Jun 2019 14:51:49 GMT Vary: Accept-Encoding Age: 10195 X-Cache: HIT Accept-Ranges: bytes Expect-CT: max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ctServer: cloudflare CF-RAY: 4d457743b9c7644f-FRA

#4

Do you have an active cache plugin? If yes disable it.

2 Likes
#5

We found the solution! Thank you guys!

2 Likes
#6

Would you mind share it? We have the same problem.

Thank you!

1 Like
closed #7

This topic was automatically closed after 14 days. New replies are no longer allowed.