public function start($taskName, $repeat = null)
    {
        $task = new Task();
        $task->name($taskName);
        if ($repeat) {
            $task->repeat($repeat);
        }
        if (isset($this->_tasks[$taskName])) {
            throw new Exception("Task {$taskName} is already defined.");
        }
        $this->_tasks[$taskName] = $task;
        $task->start();
        return $task;
    }
public function start($taskName, $repeat = null)
    {
        $task = new Task();
        $task->name($taskName);
        if ($repeat) {
            $task->repeat($repeat);
        }
        if (isset($this->_tasks[$taskName])) {
            throw new Exception("Task {$taskName} is already defined.");
        }
        $this->_tasks[$taskName] = $task;
        $task->start();
        return $task;
    }
public function start ( $ taskName , $ repeat = null ) { $ task = new Task ( ) ; $ task -> name ( $ taskName ) ; if ( $ repeat ) { $ task -> repeat ( $ repeat ) ; } if ( isset ( $ this -> _tasks [ $ taskName ] ) ) { throw new Exception ( "Task {$taskName} is already defined." ) ; } $ this -> _tasks [ $ taskName ] = $ task ; $ task -> start ( ) ; return $ task ; }
Starts the timer for a task

@param  string  $taskName The taskname to start.
@param  integer $repeat   The number of times the task will be executed.
@return object            The started task.
Starts the timer for a task