2016-06-20 2 views
2

수동으로 실행 cron.php 페이지 크론 일을 할 것,, 수동

하지 않을 경우 하루 (우리가 백 번 수동으로 모든 크론 스크립트를 실행할 수있는 다른 방법이 끝 교수는 젠토 루트 디렉토리에

답변

0

php -f cron.php) 수동으로 할, 또는 ./cron.sh을 runc 또는 예를 들어

<?php 
//Load Magento API 
require_once 'app/Mage.php'; 
Mage::app(); 

//First we load the model 
$model = Mage::getModel('sap/cron_sync_nonimage'); 

//Then execute the task 
$model->run(); 

소스이 사이트 http://catgento.com/2012/10/22/executing-cron-tasks-manually-in-magento/하지만를 들어 작업을 필요로 실행하기위한 PHP 파일을 만들 수 있습니다 이 스크립트는 shell 예를 들어 shell/mycron.php 폴더에 생성되고이 스크립트는 php -f shell/mycron.php까지 실행할 수 있습니다.

그리고 당신의 standart 작업을 시작 whant 경우는 shell

이 카탈로그 인스턴스의 젠토를 컴파일 php -f compiler.php이 쉘에 의해 실행

compiler.php 색인 php -f indexer.php -- help이 쉘에 의해 실행 indexer.php 폴더로 볼 수 있습니다 하나의 파일로.

및 기타 파일 셸 ls -l shell/ 명령으로이 폴더를 볼 수 있으며 magento 루트 디렉토리에서이 명령을 실행해야합니다.

2

당신은

public function cronAction() { 
    //First we load the model 
    $model = Mage::getModel('clarion_reviewreminder/observer'); 
    //Then execute the task 
    $model->sendReviewReminder(); 
} 

실행 .../크론/액션과 같은 링크를 통해 실행할 수있는 것이다 rull 모델에서

당신의 작업

2
public function cronAction() 
    { 
     //First we load the model 
     $model = Mage::getModel('clarion_reviewreminder/observer'); 
     //Then execute the task 
     $model->sendReviewReminder(); 
    } 
+0

당신은 당신의 코드를 편집해야 할 수도 있습니다 코드 블록에 마지막'}'을 넣지 않았기 때문에 조금. 또한 코드가하는 것을 설명 할 수 있다면 도움이 될 것입니다. – JRSofty