Support

Akeeba Backup for Joomla!

#41907 Cron not working with Cloudflare installed

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
5.3.0
PHP version
8.4.5
Akeeba Backup version
10.0.3

Latest post by nicholas on Monday, 12 May 2025 04:01 CDT

guillenphoto

Hi,

Three days ago, I have set up a Cloudflare account to protect my website.

Since then, the cron activated by Webcron is not working.

Manual backups work fine.

What should I do to make the cron working again?

Thanks for your help

Sincerely,

A. Guillen

nicholas
Akeeba Staff
Manager

You need to create CloudFlare page rules to not cache the URLs containing /akeebabackup or option=com_akeebabackup in them (that's the SEF and non-SEF form of the front-end backup URLs).

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

guillenphoto

Hi Nicholas,

 

thank you for your prompt reply. I appreciate.

In the section pages rules of Cloudflare, I do not find the option to not cache an URL.

I have attached a screenshot to show you the options I get.

Would you tell which one I must use?

Thanks

A. Guillen

nicholas
Akeeba Staff
Manager

According to CloudFlare's documentation it's the Cache Level option, with a setting of Bypass.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

guillenphoto

Thank you for your help.

In caching > cache rules, I created a custom filter expression like URl equals the URL of the cron I have created in Webcron.

I use bypass cache and I save.

When I test my cron I have an error 403.

I attached a screenshot of the problem.

I hope it will help.

nicholas
Akeeba Staff
Manager

As per your screenshot, you are getting an anti-bot CloudFlare page. This is now completely outside the scope of our support. You will have to ask CloudFlare how to allow WebCRON to access your site without getting the anti-bot page.

Look, it's mid-2025. Using URL-based backups with redirections has been called the Legacy Front-end Backup mode for well over a decade for a reason. Real CRON jobs –the standard way to automate computer maintenance tasks since the 1970s– is no longer considered a luxury in web server, but a necessity.

Do yourself a favor. Use a host that supports actual CRON jobs, set up a CRON job to trigger Joomla Scheduled Tasks every minute, and set up your backups with Joomla Scheduled Tasks. You will not have to worry about URL-based backups and everything that could go wrong with them like timeouts, network issues, User-Agent strings, redirections, anti-DoS protections, anti-bot screens, CloudFlare's OWASP ruleset exceptions etc. You will save yourself countless hours of frustration.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

guillenphoto

Hi Nicholas,

thank you for your reply.

I am going to try.

A. Guillen

guillenphoto

Hi Nicholas,

 

So, I am trying to set up your suggestion.

I have created a cron in Joomla. Everything looks fine. When I run manually, the cron I have a 524 error. The time out is set up to 1800 seconds: which is enough to a full backup. It works with webcron.org.

I am able to set up a cron with my host provider. So, I will be able to fill the Joomla Cron URL.

I have attached several screenshots to show you what I did.

The Cron URL is https://www.guillenphoto.com/en/component/ajax/?plugin=RunSchedulerWebcron&group=system&format=json&....

My website is multilangual (en and fr). Is it normal to have the /en?

I hope you will be able to find my mistake.

Thanks for all

A. Guillen

nicholas
Akeeba Staff
Manager

DANGER!

You are NOT following my advice. You have missed a very important part of my suggestion. The result is that you are doing something that will bankrupt you.

In my previous reply I told you to find a server which supports real (command line) CRON jobs. This is the important part. I told you NOT to use WebCRON, but instead use real (command-line) CRON jobs –which cost you nothing extra– to run Joomla! Scheduled Tasks every minute.

You are trying to use WebCRON to run Joomla! Scheduled Tasks, which is an honest to God financial suicide. You are using WebCRON to run the Joomla Scheduled Tasks URL once every minute. If you do the math, that's 1,440 WebCRON executions per day, or about 525,600 executions per year. If you set a timeout of 180 seconds –the point of Scheduled Tasks being that long-running tasks are broken down to smaller steps, each one executing in a minute, -ish– that's 0.0025 Euro per execution for a total of 1,314 Euro per year – that's about $1460 per year. It's even worse having set it up with an unnecessary long 1800 seconds of maximum execution time which costs 0.125 Euro per execution; in this configuration it would cost you 65,700 Euro per year, or about $73,000 per year.

I would never suggest a configuration which costs the price of a new car every year. That's insane. The most expensive alternative I am willing to give someone, if all else fails, is to use a third party service that uses the Akeeba Backup Remote JSON API. These cost $5 to $15 per month. But even in this case I would've pointed out that it's actually cheaper and less troublesome moving the site to a decent host which does support real CRON jobs; the price delta of a good host compared to a subpar host is typically much less than the $100 you'd be spending on a third party site monitoring service.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

guillenphoto

Hi Nicholas,

I guess I said something wrong. I am not using Webcron.org.

I just created a cron in Joomla and a scheduled task in Joomla as explained in that page: https://www.akeeba.com/documentation/akeeba-backup-joomla/automating-your-backup.html

The screenshots I have attached do not show anything related to Webcron. They are just copies of pages in my Joomla Admin. Really, I do not understand why you mention Webcron.

As I said, my host provider (infomaniak.ch) offers me a cron jobs. 

The problem I have if you look the attached file in my previous post is the error I get when I run manually the scheduled task. Nothing more.

I hope it is clear now. The problem I have is inside the backend of Joomla.

 

Sincerely,

A. Guillen

 

nicholas
Akeeba Staff
Manager

Really, I do not understand why you mention Webcron.

Because that's what you told me:

I have created a cron in Joomla. Everything looks fine. When I run manually, the cron I have a 524 error. The time out is set up to 1800 seconds: which is enough to a full backup. It works with webcron.org.

In any case, you are still not doing what I told you to do.

You cannot test the scheduled task in the backend. The backup task is a resumable task as I have explained in https://www.akeeba.com/documentation/akeeba-backup-joomla/automating-your-backup.html#joomla-scheduled-tasks. As such, it does not finish running when you call it; it pauses and waits to be resumed later. That's the "error" you got. When it's called by the Joomla Scheduled Tasks scheduled it won't throw an error. Does Joomla's interface sucks sweaty, hairy balls? Yes, it does. I didn't write it, and I did tell them at the time its a subpar user experience.

So, let's go back to what I have been telling you to do.

Does your server have real, CLI-based CRON jobs? If not, STOP – move your site to a server with real CRON jobs.

If your server has real, CLI-based CRON jobs follow the instructions in the "Setting up your site for scheduling using a CLI CRON job" section first. You can find that in the sole link I gave you in this here reply.

Once this is working, create a new Scheduled Task of type "Akeeba Backup – Take a Backup" and schedule it to take a backup whenever you want. DO NOT try to run it manually; resumable tasks cannot be tested through the backend interface. Wait for it to run at its scheduled time.

The fact that the backup task is resumable is why it's so important to have the Joomla Scheduled Tasks scheduler CRON job run once a minute. The backup will do some work for one to 20 seconds, then it will return. What we want is Joomla to run its scheduler again when the next minute of the hour comes, thus telling our backup task to resume work. It will again work for anywhere from 1 to 20 seconds, then it will return again. Rinse and repeat, until the backup is done, at which point the backup task will return a success, and the scheduler will reschedule it for its next execution.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!