|
|
|
@ -41,12 +41,15 @@ class CmdTasksModel extends Model{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//插入任务
|
|
|
|
|
public function addTask($type,$params,$need_tasksid = true)
|
|
|
|
|
public function addTask($type,$params,$need_tasksid = true,$need_path=true)
|
|
|
|
|
{
|
|
|
|
|
$task = $this->field("end_time")->where(['status'=>"1",'type'=>$type])->order("id desc")->find();
|
|
|
|
|
if(!empty($task)){
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if($need_path){
|
|
|
|
|
$params = "cd ".ROOTTTTT.";".$params;
|
|
|
|
|
}
|
|
|
|
|
if($need_tasksid){
|
|
|
|
|
$params = rtrim($params,";").'/taskid/{$taskid};';
|
|
|
|
|
}
|
|
|
|
|