我正在尝试在 CakePHP 工作中获得一个 cronjob。但我收到此错误:错误:无法加载类TestingShell。
这是我的/app/vendors/shells/testing.php
文件:
class TestingShell extends Shell {
var $uses = array('Test');
function main(){
$this->out('Number of tests :');
$this->out($this->Test->find('count'));
$this->out('.');
if($this->Test->delete(1)){
$this->out('test deleted');
}
else{
$this->out('test not deleted');
}
}
}
我这样调用cronjob:/home/root/public_html/site/cake/console/cake -app/home/root/public_html/site/apptesting
我做错了什么?非常感谢!
编辑我必须补充一点,在本地,shell 工作正常。
最佳答案
查看此错误报告 - 这是我的问题。
快速修复是回滚到 1.3.7。
关于CakePHP Shell cronjob : Error: Class TestingShell could not be loaded,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5809210/