0

-job.execute works, cron runs when i click Execute Now
-individual and group test mail works properly
-curl is running
-joomla 3.8.7
-apache 24
-php 7.2.4
-civicrm 5.0.1

Here's the problem:

-I could not find a solution, I know how to make a schedule job in window to run cron.php, but cron needs the CMS's username and password, so I did as Bobs suggested

-But there was an error saying No such file or directory

enter image description here

-Then i notice there is duplication in directory in Joomla.php, I guess this is the cause (because civicrm_root contains absolute path and defines.php has another) but i dont know how to fix it

 /**
  * Setup the base path related constant.
  * @return mixed
  */
 public function getBasePath() {
   global $civicrm_root;
   $joomlaPath = explode('/administrator', $civicrm_root);
   $joomlaBase = $joomlaPath[0];
   return $joomlaBase;
 }



update:
-Did as Bobs suggest, to change civicrm.setting.php civicrm_root's directory slashes, it works! but new problem spawns

Warning: require_once(\libraries/import.legacy.php): failed to open stream: No such file or directory in C:\Apache24\htdocs\joomla\administrator\includes\framework.php on line 15

Fatal error: require_once(): Failed opening required '\libraries/import.legacy.php' (include_path='.;C:\Apache24\htdocs\joomla\administrator\components\com_civicrm\civicrm;C:\Apache24\htdocs\joomla\administrator\components\com_civicrm\civicrm\packages;C:\Apache24\htdocs\joomla\administrator\components\com_civicrm\civicrm\vendor/tecnickcom;C:\Apache24\htdocs\joomla\administrator\components\com_civicrm\civicrm\vendor/phpseclib/phpseclib/phpseclib;C:\Apache24\htdocs\joomla\administrator\components\com_civicrm\civicrm\vendor/pear/pear_exception;C:\Apache24\htdocs\joomla\administrator\components\com_civicrm\civicrm\vendor/pear/auth_sasl;C:\Apache24\htdocs\joomla\administrator\components\com_civicrm\civicrm\vendor/pear/net_socket;C:\Apache24\htdocs\joomla\administrator\components\com_civicrm\civicrm\vendor/pear/net_smtp;C:\Apache24\htdocs\joomla\administrator\components\com_civicrm\civicrm\vendor/pear/validate_finance_creditcard;.;C: in C:\Apache24\htdocs\joomla\administrator\includes\framework.php on line 15


i tried to change some lines in administrator/includes/defines.php or duplicate joomla/libraries to joomla/administrator, then it said

No configuration file found and no installation code available. Exiting...

my goodness i just want this cron works, why so complicated :(

Conclusion: -seems like compatibility problem with joomla 3.8.7 and civicrm 5.0.1, please check comments below for references

1

There is no cron command in Windows. Instead, use Task Scheduler to create scheduled tasks that call wget, curl, or php.

  • but how do i let civicrm know that cron is running? – Jennifer Lee May 7 '18 at 3:38
  • Civi does not need to know that cron is running. Cron (linux) or Task Scheduler (Windows) are simply programs which are used to run commands on a schedule. For Civi, they are typically used to run the Job.execute command every 5 minutes so that Civi can perform tasks it needs to do periodically, like check for emails which have been scheduled to send at a certain time. Did you create a task in Task Scheduler to run Job.execute? Does it run the task as you scheduled it? What is the problem you're having? – BobS May 7 '18 at 8:16
  • Thank you, and I updated the question, please take a look – Jennifer Lee May 7 '18 at 9:38
  • 1. Can you access Joomla pages and the Civi pages from the browser? If not, you need to fix that before worrying about cron jobs. 2. From your browser screenshot, it looks like your not passing the required parameters of username, password, and site-key. See docs.civicrm.org/sysadmin/en/latest/setup/jobs/…. Those same parameters must be in your civicrm-curl data file. – BobS May 7 '18 at 10:14
  • 1. I can access joomla and civi normally, individual and group test mail works, curl is running, but only cron is not working 2. yes, i have tried that solution but i dont know how to do it, where should i put the username password and site-key? i tried civicrm-curl file (with no extension, just a file), but the cmd gives me errors saying they could not find the directory (please see image 2cmd and 3notepad ++) – Jennifer Lee May 7 '18 at 10:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.