Cron不会运行codeignitier功能吗?

时间:2016-02-02 10:14:03

标签: php codeigniter cron

当我尝试没有功能的控制器时,它可以正常工作,但是功能有些不对劲。

0 * * * * php /home/31175-23437.cloudwaysapps.com/username/public_html/index.php historic //this works
* * * * * php /home/31175-23437.cloudwaysapps.com/username/public_html/index.php system runsystem //this don't works

我确信/ system / runsystem有效。

runsystem包含以下代码:

public function runsystem(){
    $systemid = $this->sys_model->getmailsystems();
    foreach($systemid->result() as $row){
        $this->system_options("right","1x2","EU",true,$row->sys_id);
    }
    $usersystems = $this->sys_model->getusersystems();
    foreach($usersystems->result() as $row){
        $email = $row->email;
        $subject = $row->subject;
        $message = $row->message;
        sendmail($email,$subject,$message);
    }       
}

0 个答案:

没有答案