Support

Akeeba Backup for Joomla!

#38994 Cronjob - Scheduled Tasks

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
4.3.1
PHP version
8020
Akeeba Backup version
9.6.0

Latest post by nicholas on Wednesday, 17 May 2023 03:16 CDT

bergente

Hello,

we have a problem with the automatic scheduled backups.

first:
Command line cronjobs don't work.
We've entered the right command line in our host's interface, in this case:
"cli/joomla.php akeeba:backup:take"
but nothing happens.

second:
We also tried the Joomla scheduled task.
They only work as a test task, but not autmatically.

We have no clue what we should do further.

Thank you in advance

Tom

 

nicholas
Akeeba Staff
Manager

We've entered the right command line in our host's interface, in this case:
"cli/joomla.php akeeba:backup:take"
but nothing happens.

You are missing something. Actually, you are missing two things.

If you take a look at the Schedule Automatic Backups page in the software, or our documentation page on setting up CRON jobs, you will see that we tell you to put the path to your PHP executable in front. Moreover, we tell you to use the absolute path to the joomla.php script; the exact path is shown in the Schedule Automatic Backups page in the software.

For example, on one of my sites' cPanel server I need to use the following command line

/usr/local/bin/ea-php82 /home/something/public_html/cli/joomla.php akeeba:backup:table

The /usr/local/bin/ea-php82 part is the path to my server's PHP 8.2 CLI binary. This path was provided by my host.

The /home/something/public_html/cli/joomla.php part is the full path to Joomla's CLI application file. This was provided by the Schedule Automatic Backups page in Akeeba Backup itself.

We also tried the Joomla scheduled task.
They only work as a test task, but not autmatically.

You didn't read the documentation, yes?

I wrote that fairly big part in our documentation because Joomla has zero documentation about Scheduled Tasks. Crucially, Joomla fails to even mention in passing that, out of the box, Scheduled Tasks will do absolutely nothing at all 🤦🏼‍♂️ They are not a replacement for CRON jobs, they are meant to be a complementary feature to CRON jobs in that they move the scheduling set up from the user-hostile hosting control panel interface to a much easier to use interface inside Joomla itself. Not that you'd know and it's totally not your fault. Joomla didn't tell you and you can't magically know what you objectively cannot know unless someone tells you about.

Joomla's Scheduled Tasks need something to periodically tell them to execute. This something can be Lazy Scheduling (triggered by traffic on your site; an extremely bad idea for backups for the reasons we have documented), a CLI CRON job, or a URL CRON job. Since you've enabled none of the above, no Scheduled Tasks get to execute. I know exactly how counter-intuitive this is. I kept telling them that this needs to be addressed both in the documentation and in the software itself. Ultimately, I can only fix code; I can't fix the stupid in some people.

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!