protected function addTask(TaskInterface $instance) {
        $this->_task_list[] = $instance;
        $this->_cron->add(
            $instance->name,
            $instance->time,
            [$instance, 'execute'],
            $instance->params,
            $instance->persistent
        );
    }
protected function addTask(TaskInterface $instance) {
        $this->_task_list[] = $instance;
        $this->_cron->add(
            $instance->name,
            $instance->time,
            [$instance, 'execute'],
            $instance->params,
            $instance->persistent
        );
    }
protected function addTask ( TaskInterface $ instance ) { $ this -> _task_list [ ] = $ instance ; $ this -> _cron -> add ( $ instance -> name , $ instance -> time , [ $ instance , 'execute' ] , $ instance -> params , $ instance -> persistent ) ; }
Add a task to cron service.

@param TaskInterface $instance
Add a task to cron service .