I'm using DRUPAL 9 CivicCRM 5.54 and running it on CPanel. This is a new install.
The cron job on CPanel runs and doesn't generate errors, however the cron.php
script doesn't run the job.execute
API call.
CRON JoB is detailed here:
/usr/local/bin/php /home/changin5/public_html/vendor/civicrm/civicrm-core/bin/cron.php name=admin pass=XXXXXXXXX key=XXXXXXXXXX > /home/changin5/public_html/civicrm.log 2>&1
The CRON.php
script has various file paths in it which are not correct as far as I can see.
I've commented out the actual ones where files exist and left in the original ones in the script, but it doesn't run the jobs!
Adding in the file paths that are commented out still doesn't run the API call.
Script Paths:
'/public_html/modules/contrib/civicrm/civicrm.config.php.drupal'
- this existsrequire_once '../civicrm.config.php';
doesn't exist except as above!'/home/changin5/public_html/vendor/civicrm/civicrm-core/CRM/Core/Config.php'
- this existsrequire_once 'CRM/Core/Config.php';
'/home/changin5/public_html/vendor/civicrm/civicrm-core/CRM/Utils/Request.php'
- this exists
require_once 'CRM/Utils/Request.php';
CRM_Core_Config::singleton();
CRM_Utils_System::authenticateScript(TRUE);
$job = CRM_Utils_Request::retrieve('job', 'String', CRM_Core_DAO::$_nullArray, FALSE, NULL, 'REQUEST');
/*'/home/changin5/public_html/vendor/civicrm/civicrm-core/CRM/Core/JobManager.php'*/
require_once 'CRM/Core/JobManager.php';
$facility = new CRM_Core_JobManager();
if ($job === NULL) {
$facility->execute();
}
else {
$ignored = array("name", "pass", "key", "job");
$params = array();
foreach ($_REQUEST as $name => $value) {
if (!in_array($name, $ignored)) {
$params[$name] = CRM_Utils_Request::retrieve($name, 'String', CRM_Core_DAO::$_nullArray, FALSE, NULL, 'REQUEST');
}
}
$facility->setSingleRunParams('job', $job, $params, 'From cron.php');
$facility->executeJobByAction('job', $job);
}
Having tried to make these file paths accurate the script still doesn't run, it didn't run with the original paths as the cron.php
sits in vendors/civicrm/civicrm-core/bin
and calls to file paths in ..CRM/Core
or ..CRM/Utils
or both of which exist but ../civicrm.config.php
doesn't exist!
Any pointers as to what files this script is meant to be referring to and where they are? And have I got it correct that they should be fully relative paths rather than ..CRM
etc?