public function create($checkExist = false)
    {
        $this->convertation();

        $model = new \CAgent;

        return $model->AddAgent(
            AgentHelper::createName($this->class, $this->constructorArgs, $this->callChain),
            $this->module,
            $this->periodically,
            $this->interval,
            null,
            $this->active,
            $this->executionTime,
            $this->sort,
            $this->userId,
            $checkExist
        );
    }
public function create($checkExist = false)
    {
        $this->convertation();

        $model = new \CAgent;

        return $model->AddAgent(
            AgentHelper::createName($this->class, $this->constructorArgs, $this->callChain),
            $this->module,
            $this->periodically,
            $this->interval,
            null,
            $this->active,
            $this->executionTime,
            $this->sort,
            $this->userId,
            $checkExist
        );
    }
public function create ( $ checkExist = false ) { $ this -> convertation ( ) ; $ model = new \ CAgent ; return $ model -> AddAgent ( AgentHelper :: createName ( $ this -> class , $ this -> constructorArgs , $ this -> callChain ) , $ this -> module , $ this -> periodically , $ this -> interval , null , $ this -> active , $ this -> executionTime , $ this -> sort , $ this -> userId , $ checkExist ) ; }
Create agent in Bitrix queue.

@param bool $checkExist Return false and set `CAdminException`, if agent already exist.

@return bool|int ID of agent or false if `$checkExist` is true and agent already exist.
Create agent in Bitrix queue .