Cron job doesn't work after adding Cloudflare DNS

So it does not execute any HTTP call whatsoever, right? In that case Cloudflare cannot be involved at all, as Cloudflare only operates on an HTTP level.

Can you post the exact error message? If that is a file system “permission denied” it must be something you changed there, Cloudflare does not and cannot influence that.

Well, I dont see the error in any logs, but I received email from my server host to inform me the cron job can not be executing because of permission denied.
So the fact it’s happening a day after I added Cloudflare doesn’t mean anything for you?

If that cron job is not doing anything HTTP related, that would be a coincidence. You will need to check where that error message exactly comes from.

Now I thing about it, this cron job execute a script which make an http request. Can it be related?

You said there was no HTTP involved. If there is, then this will most likely be the reason and you should switch to a local approach. Executing local code via HTTP is a rather bad architecture.

I did not realized it was involving http in the code, I only thing about script being execute directly in the server.
So there is no way to make a cron job with http? I need this to get updates data from api once a day and then updating my server database

Where exactly do you run the HTTP request? When you connect to that API or when you update the database?

Assuming that API is not yours, you will have to go the HTTP route however then Cloudflare won’t be involved - or was involved before either, but you won’t be able to control the security settings.

What you essentially need to do is debug that and find where it breaks.

I run http when I connect to that api. And the api is actually mine from another server
So is there a way to configure this and make it works?
Thank you so much for your responses and your help

Any way to avoid HTTP?

If not, you could try to access the other server via its actual IP address instead, going around Cloudflare.

Ok, I got it.
But there is no way to fix it but adding record for example, right?

You can add an unproxied record.

Essentially you can

  • add an unproxied record.
  • adjust your security level.
  • whitelist the address.
  • connect via the IP.
  • switch away from HTTP.

Thank you for this complete answer.
Can you provide me more information about the unproxied record to add? which record should it be? with which name? and which ip? thank you

Any record you want and the IP address obviously has to be the same one as before. You could even unproxy the original record, just keep in mind this will not hide the IP address behind Cloudflare any longer.

I don’t understand which IP you are talking about? server’s or api’s?
And what original record are we talking about?

The original record you are connecting to.

And if I want to whitelist the address as you said, I have to add in IP access Rules the address of the api I use in my code?

Exactly.

Hi, I added my api’s IP in whitelist yesterday.
I also talked with my host that said they allowed access on the server side.
But still I have the same problem today when trying to execute my cron job.

I’d like to add the record, but I still ont understand how and what record I should add to make it work, please help me for that and provide me some explanations. I am really lost on this…

Just switch the record from :orange: to :grey:

But which record? My cron job is configured from my cpanel host, I dont have any record about it for now.
So Im really confused about what record to add and which value to set