Civicrm – ローカルサーバーでCronを設定する方法

-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:Apache24htdocsjoomlaadministratorincludesframework.php on
line 15

Fatal error: require_once(): Failed opening required
'libraries/import.legacy.php'
(include_path='.;C:Apache24htdocsjoomlaadministratorcomponentscom_civicrmcivicrm;C:Apache24htdocsjoomlaadministratorcomponentscom_civicrmcivicrmpackages;C:Apache24htdocsjoomlaadministratorcomponentscom_civicrmcivicrmvendor/tecnickcom;C:Apache24htdocsjoomlaadministratorcomponentscom_civicrmcivicrmvendor/phpseclib/phpseclib/phpseclib;C:Apache24htdocsjoomlaadministratorcomponentscom_civicrmcivicrmvendor/pear/pear_exception;C:Apache24htdocsjoomlaadministratorcomponentscom_civicrmcivicrmvendor/pear/auth_sasl;C:Apache24htdocsjoomlaadministratorcomponentscom_civicrmcivicrmvendor/pear/net_socket;C:Apache24htdocsjoomlaadministratorcomponentscom_civicrmcivicrmvendor/pear/net_smtp;C:Apache24htdocsjoomlaadministratorcomponentscom_civicrmcivicrmvendor/pear/validate_finance_creditcard;.;C:
in C:Apache24htdocsjoomlaadministratorincludesframework.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 🙁

結論: joomla 3.8.7とcivicrm
5.0.1との互換性の問題のように見えるので、下記のコメントを参照してください

ベストアンサー

Windowsにはcronコマンドはありません。代わりに、タスクスケジューラを使用して、wget、curl、またはphpを呼び出すスケジュールされたタスクを作成します。

コメントする

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です