2
我有我的貝殼類目錄中的應用程序/殼牌 而cakeShell目錄中的應用程序/軟件/ 所以,當我執行命令 FULLPATH /應用/蛋糕爲了 我得到的錯誤貝殼類orderShell找不到CakePhp2.x在Windows中使用CronJobs
這是我的殼類代碼:
<?php
namespace app\Shell;
use Cake\Console\Shell;
class OrderShell extends Shell {
function main() // main needs to define
{
App::import(‘Component’, ‘BusinessLogic’);
$this->BusinessLogic = &new BusinessLogic();
$option = !empty($this->args[0]) ? $this->args[0] : 」;
echo ‘Cron started without any issue.’;
switch ($option)
{
case ‘first’:
$result= $this->BusinessLogic->first_method();
break;
case ‘second’:
$result= $this->BusinessLogic->deleteauto();
break;
default:
echo ‘No Parameters passed .’;
}
}
}