【发布时间】:2011-04-28 08:05:10
【问题描述】:
我正在尝试在 CakePHP 工作中获得一个 cronjob。但我收到此错误:Error: Class TestingShell could not be loaded.
这是我的/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/app testing
我做错了什么?非常感谢!
编辑我必须补充一点,在本地,shell 工作正常。
【问题讨论】: