Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Joomla 5.1.2 - Web Cron does not execute scheduled tasks. #43903

Open
J-Wick4 opened this issue Aug 11, 2024 · 2 comments
Open

Joomla 5.1.2 - Web Cron does not execute scheduled tasks. #43903

J-Wick4 opened this issue Aug 11, 2024 · 2 comments

Comments

@J-Wick4
Copy link

J-Wick4 commented Aug 11, 2024

Steps to reproduce the issue

  • Disabled Lazy loader.
  • Enabled Web Cron, generated hashed URL, saved.
  • Set up a task to execute every minute.
  • Setup a cron entry to fetch the hashed URL produced by Joomla to run every minute.

Expected result

Fetch the Web Cron URL with system cron every minute and have scheduled tasks executed based on their interval settings.

Actual result

Cron reported success, but no tasks were ever executed.

The first time accessing the web cron URL in a browser, this log is produced, then never again on subsequent reloads. Is this an error of the URL Rewrites function or a lack of a menu item?

2024-08-11T04:01:37+00:00 CRITICAL 206.45.15.244 error Uncaught Throwable of type Joomla\CMS\Router\Exception\RouteNotFoundException thrown with message "Page not found". Stack trace: #0 [ROOT]/libraries/src/Application/SiteApplication.php(754): Joomla\CMS\Router\Router->parse()
#1 [ROOT]/libraries/src/Application/SiteApplication.php(244): Joomla\CMS\Application\SiteApplication->route()
#2 [ROOT]/libraries/src/Application/CMSApplication.php(306): Joomla\CMS\Application\SiteApplication->doExecute()
#3 [ROOT]/includes/app.php(58): Joomla\CMS\Application\CMSApplication->execute()
#4 [ROOT]/index.php(32): require_once('...')
#5 {main}

System information (as much as possible)

Joomla 5.1.2
PHP 8.3.10
Apache w/ FPM
MariaDB 10.6.19
Rocky Linux 8.6
Plesk Obsidian 18.0.62
Cloudflare Pro

Additional comments

I got the scheduled tasks running by using the cli/joom.php method using cron, which, in reality, is a better and more secure method. However, using this method required me to program additional code to generate logs, whereas when using the "Run Test" button of the task, it generates logs the usual Joomla way.

@richard67
Copy link
Member

Setup a cron entry to fetch the hashed URL produced by Joomla to run every minute.

@J-Wick4 This step is not 100% clear to me. How and where do you set up the cron entry to fetch the trigger (hashed) URL?

  • A web cron job e.g. like some providers allow to do in their control panel?
  • A real Unix cron job doing using e.g. curl?
    Could you provide details on that?

Besides that, the issue could be similar or related to what is handled with PRs #43817 and #43164 .

@richard67
Copy link
Member

@J-Wick4 Could you test if this pull request solves your issue? #43817

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants