src/Viserio/Component/Cron/Schedule.php
public function command(string $command, array $parameters = []): CronContract
    {
        if ($this->container !== null && $this->container->has($command)) {
            $command = $this->container->get($command)->getName();
        }

        if (\defined('CEREBRO_BINARY')) {
            return $this->exec(Application::formatCommandString($command), $parameters);
        }

        if ($this->console !== null) {
            $binary  = \escapeshellarg((string) (new PhpExecutableFinder())->find(false));
            $console = \escapeshellarg($this->console);

            return $this->exec(\sprintf('%s %s %s', $binary, $console, $command), $parameters);
        }

        throw new LogicException('You need to set a console name or a path to a console, before you call command.');
    }
public function command(string $command, array $parameters = []): CronContract
    {
        if ($this->container !== null && $this->container->has($command)) {
            $command = $this->container->get($command)->getName();
        }

        if (\defined('CEREBRO_BINARY')) {
            return $this->exec(Application::formatCommandString($command), $parameters);
        }

        if ($this->console !== null) {
            $binary  = \escapeshellarg((string) (new PhpExecutableFinder())->find(false));
            $console = \escapeshellarg($this->console);

            return $this->exec(\sprintf('%s %s %s', $binary, $console, $command), $parameters);
        }

        throw new LogicException('You need to set a console name or a path to a console, before you call command.');
    }
{@inheritdoc}