Helper to get the full Cron command

@return string
978938
public function getCronCommand()
    {
        $phpBinaryFinder = new PhpExecutableFinder();
        $php = $phpBinaryFinder->find();
        $command = 'cd ' . str_replace(' ', '\ ', GRAV_ROOT) . ';' . $php . ' bin/grav scheduler';

        return "(crontab -l; echo \"* * * * * {$command} 1>> /dev/null 2>&1\") | crontab -";
    }
933790
public function getSchedule()
    {
        return implode(' ', [
                $this->getScheduleMonth(),
                $this->getScheduleWeek(),
                $this->getScheduleDayOfMonth(),
                $this->getScheduleDayOfWeek(),
                $this->getScheduleHour(),
                $this->getScheduleMinute()
            ]);
    }
171587
public function getCommandLine()
    {
        return is_array($this->commandline) ? implode(' ', array_map(array($this, 'escapeArgument'), $this->commandline)) : $this->commandline;
    }
351851
public function getCrons(): array
    {
        ksort($this->crons);
        $crons = [];

        foreach ($this->crons as $priority => $cs) {
            foreach ($cs as $cron) {
                $crons[$priority . ';' . $cron->getAlias()] = $cron;
            }
        }

        return $crons;
    }
1148180
public function getResponse(){
        if($this->httpCore != NULL){
            return $this->httpCore->httpResponse;
        }else{
            return $this->cronCore->cronResponse;
        }
    }
499613
public function executeCronController(){
        $class= $this->data['class'];//$this->cronRequest->getParamAll(1);
        //Analizo si llamo a los controladores del usuario o si llamo al manejador de tareas o shell script del framework
        if($class == 'CronManagement'){
            //Ejecuto el CronManagement
            $this->executeCronManagement();
        }
        if($class != 'CronManagement'){
            $method= "index";
            //Si la diferencia es mayor a 2 entre ambos arreglos de parametros quiere decir que se indico el nombre del metodo
            //if(count($this->cronRequest->getAllParams()) - count($this->cronRequest->getParams()) > 2){
            if($this->data['method'] != null){
                $method= $this->data['method'];
            }
            //Ejecuto Cron de Usuario o Shell Script del Framework
            if(strpos($class, 'Eno-') === 0){
                //Ejecuto el cron
                $this->executeShellScript(substr($class, 4), $method);
            }else{
                //Ejecuto el cron
                $this->executeCron($class, $method);
            }
        }
    }
854368
public function getScheduledCommands()
    {
        $scheduledCommands = [];
        foreach ($this->console->all() as $command) {
            if ($command instanceof ScheduledCommandInterface) {
                $scheduledCommands[] = $command;
            }
        }

        return $scheduledCommands;
    }
929413
private function get_cron_data( $name ) {
            $this->_logger->entrance( $name );

            /**
             * @var object $cron_data
             */
            return $this->_storage->get( "{$name}_cron", null );
        }
1257533
public function getBuiltCommand()
    {
        $cmd = $this->command;

        foreach ($this->arguments as $argument) {
            $os = $argument->getOs();

            if ($os && !($os & $this->os->getType())) {
                continue;
            }

            $key = $argument->getKey();
            $prefix = $argument->getPrefix();

            if ($argument->willEscape() === true || ($argument->willEscape() === null && ($this->flags & ESCAPE))) {
                $key = $this->escapeshellarg($key);
            }
            $key = $prefix.$key;

            $values = $argument->getValues();

            if (empty($values)) {
                $cmd .= " $key";
                continue;
            }

            foreach ($values as $val) {
                $cmd .= " $key";
                $cmd .= ($this->flags & DONT_ADD_SPACE_BEFORE_VALUE) ? '' : ' ';
                if ($argument->willEscape() === true || ($argument->willEscape() === null && ($this->flags & ESCAPE))) {
                    $val = $this->escapeshellarg($val);
                }
                $cmd .= $val;
            }
        }

        return trim($cmd);
    }
603741
static function maxScriptExecutionTime()
    {
        global $cronPart;
        $cronjobIni = eZINI::instance( 'cronjob.ini' );

        $scriptGroup = "CronjobPart-$cronPart";
        if ( $cronPart !== false and $cronjobIni->hasVariable( $scriptGroup, 'MaxScriptExecutionTime' ) )
            return $cronjobIni->variable( $scriptGroup, 'MaxScriptExecutionTime' );
        else
            return $cronjobIni->variable( 'CronjobSettings', 'MaxScriptExecutionTime' );
    }
387142
public function getCommandName()
    {
        preg_match("/\\\\([\w]+)Command$/", get_class($this->command), $matches);
        return isset($matches[1]) ? lcfirst($matches[1]).'()' : 'Method';
    }
17709
public function getCommand(): string
    {
        $port = $this->config->getPort();

        $java_bin = $this->config->getJavaBin();

        $jars = [];
        $classpaths = $this->config->getClasspaths();
        foreach ($classpaths as $classpath) {
            if (preg_match('/\*\.jar$/', $classpath)) {
                $directory = preg_replace('/\*\.jar$/', '', $classpath);
                $files = glob("$directory/*.jar");
                //foreach ($files as $file) {
                foreach ($files as $file) {
                    $jars[] = $file;
                }
                //}
            } else {
                $jars[] = $classpath;
            }
        }

        $jars[] = $this->config->getServerJar();
        $classpath = implode(':', $jars);
        $threads = $this->config->getThreads();

        $directives = ' -D' . implode(' -D', [
                    'php.java.bridge.daemon="false"',
                    "php.java.bridge.threads=$threads"
        ]);

        $command = sprintf(
            '%s -cp "%s" %s php.java.bridge.Standalone SERVLET:%d',
            $java_bin,
            $classpath,
            $directives,
            $port
        );

        return $command;
    }
589153
protected function _scheduleVars() {
		global $argv;
		$path = $argv[2] . DS;
		$shellName = $argv[3];
		$taskName = $argv[4];

		if (isset($this->args[0]) && $this->hasMethod($this->args[0])) {
			$methodName = $this->args[0];
			array_shift($this->args);
		} else {
			$methodName = null;
		}

		$command = implode(' ', array_filter(array(
			'Console/cake',
			$shellName,
			$taskName,
			$methodName
		)));

		$arguments = $this->args;
		foreach ($this->params as $name => $value) {
			if (in_array($name, array(
						'scheduled',
						'scheduled-depends-on',
						'scheduled-wait-prev',
						'skip-unlogged',
						'scheduled-process-timeout'
							), true)) {
				continue;
			}
			if (is_bool($value) && $value) {
				$arguments[] = '--' . $name;
			} elseif (!is_bool($value)) {
				$arguments['--' . $name] = $value;
			}
		}

		$options = array(
			'timeout' => $this->params['scheduled-process-timeout'],
			'dependsOn' => empty($this->params['scheduled-depends-on']) ? array() : explode(',', $this->params['scheduled-depends-on'])
		);

		return array($command, $path, $arguments, $options);
	}
594611
public function is_cron_required() {
        global $CFG;

        $name = $this->get_name();
        $versionfile = "$CFG->dirroot/enrol/$name/version.php";
        $plugin = new stdClass();
        include($versionfile);
        if (empty($plugin->cron)) {
            return false;
        }
        $lastexecuted = $this->get_config('lastcron', 0);
        if ($lastexecuted + $plugin->cron < time()) {
            return true;
        } else {
            return false;
        }
    }
1363164
def get_full_command(self):
        
        if self.is_command():
            command, _, args = self.text.partition(' ')
            return command, args
1047763
public function getCommandToExecute()
    {
        $command = implode(
            " ",
            array(
                $this->bin,
                $this->script,
                $this->command,
            )
        );
        return trim(preg_replace('/\s+/', ' ', $command));
    }
662530
public function getProcessedHelp()
    {
        $name = $this->name;
        $isSingleCommand = $this->application && $this->application->isSingleCommand();

        $placeholders = [
            '%command.name%',
            '%command.full_name%',
        ];
        $replacements = [
            $name,
            $isSingleCommand ? $_SERVER['PHP_SELF'] : $_SERVER['PHP_SELF'].' '.$name,
        ];

        return str_replace($placeholders, $replacements, $this->getHelp() ?: $this->getDescription());
    }