Fetch the Web Cron URL with system cron every minute and have scheduled tasks executed based on their interval settings.
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}
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
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.
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
Information Required
|
Can you please check if this is solved with 5.2?
Labels |
Added:
bug
|
The web cron URL provided by Joomla in Global Configuration --> Scheduled Tasks --> Web Cron --> Web Cron Link (base) is not correct.
The folder path is not correct (should have an "s" on end of "/component" and there is no "ajax" subfolder in the "components" folder.
An example of what's currently generated: (as of Joomla 5.2.5)
https://mywebsite.com/component/ajax/?plugin=RunSchedulerWebcron&group=system&format=json&hash=123abc456def789gh
However, the tasks can be successfully run by cron with: (credit)
php /path/to/joomla/cli/joomla.php scheduler: run
Credit
Above is in Joomla documentation for the cli, but not mentioned in the scheduled tasks documentation.
@adoucette The "component/ajax" in the URL does not belong to real folders. The router in Joomla uses that to resolve the component ("ajax" in this case), and the options are passed to that component via the URL parameters.
@Hackwar may correct me if I'm wrong.
@adoucette you are confusing file paths and urls
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-06-16 18:33:51 |
Closed_By | ⇒ | MacJoom |
@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?
Could you provide details on that?
Besides that, the issue could be similar or related to what is handled with PRs #43817 and #43164 .