Classes/Console/Command/SchedulerCommandController.php
public function runCommand($task = null, $force = false, $taskId = null)
    {
        if ($taskId !== null) {
            // @deprecated in 5.0 will be removed in 6.0
            $this->outputLine('<warning>Using --task-id is deprecated. Please use --task instead.</warning>');
            $task = $taskId;
        }
        if ($task !== null) {
            if ($task <= 0) {
                $this->outputLine('Task Id must be higher than zero.');
                $this->quit(1);
            }
            $this->executeSingleTask($task, $force);
        } else {
            if ($force) {
                $this->outputLine('Execution can only be forced when a single task is specified.');
                $this->quit(2);
            }
            $this->executeScheduledTasks();
        }
    }
public function runCommand($task = null, $force = false, $taskId = null)
    {
        if ($taskId !== null) {
            // @deprecated in 5.0 will be removed in 6.0
            $this->outputLine('<warning>Using --task-id is deprecated. Please use --task instead.</warning>');
            $task = $taskId;
        }
        if ($task !== null) {
            if ($task <= 0) {
                $this->outputLine('Task Id must be higher than zero.');
                $this->quit(1);
            }
            $this->executeSingleTask($task, $force);
        } else {
            if ($force) {
                $this->outputLine('Execution can only be forced when a single task is specified.');
                $this->quit(2);
            }
            $this->executeScheduledTasks();
        }
    }
Run scheduler

Executes tasks that are registered in the scheduler module.

<b>Example:</b> <code>%command.full_name% 42 --force</code>

@param int $task Uid of the task that should be executed (instead of all scheduled tasks)
@param bool $force The execution can be forced with this flag. The task will then be executed even if it is not scheduled for execution yet. Only works, when a task is specified.
@param int $taskId Deprecated option (same as --task)