public function checkCronJobsExists() {
		if ($this->isOsWindows()) {
			return true;
		}

		$apacheUser = $this->getWebSrvUser();
		if (empty($apacheUser)) {
			return false;
		}

		$cronjobsList = $this->_modelConfigInstaller->getListCronJobsCreation();
		if (empty($cronjobsList)) {
			return true;
		}

		$output = [];
		$exitCode = -1;
		$cmd = 'crontab -u ' . $apacheUser . ' -l 2>/dev/null';
		exec($cmd, $output, $exitCode);
		if ($exitCode !== 0) {
			return false;
		}

		if (empty($output)) {
			return false;
		}

		foreach ($cronjobsList as $cmd => $time) {
			if (empty($cmd)) {
				continue;
			}

			if (count(preg_grep('/^[^#]+' . preg_quote($cmd, '/') . '$/', $output)) == 0) {
				return false;
			}
		}

		return true;
	}
public function checkCronJobsExists() {
		if ($this->isOsWindows()) {
			return true;
		}

		$apacheUser = $this->getWebSrvUser();
		if (empty($apacheUser)) {
			return false;
		}

		$cronjobsList = $this->_modelConfigInstaller->getListCronJobsCreation();
		if (empty($cronjobsList)) {
			return true;
		}

		$output = [];
		$exitCode = -1;
		$cmd = 'crontab -u ' . $apacheUser . ' -l 2>/dev/null';
		exec($cmd, $output, $exitCode);
		if ($exitCode !== 0) {
			return false;
		}

		if (empty($output)) {
			return false;
		}

		foreach ($cronjobsList as $cmd => $time) {
			if (empty($cmd)) {
				continue;
			}

			if (count(preg_grep('/^[^#]+' . preg_quote($cmd, '/') . '$/', $output)) == 0) {
				return false;
			}
		}

		return true;
	}
public function checkCronJobsExists ( ) { if ( $ this -> isOsWindows ( ) ) { return true ; } $ apacheUser = $ this -> getWebSrvUser ( ) ; if ( empty ( $ apacheUser ) ) { return false ; } $ cronjobsList = $ this -> _modelConfigInstaller -> getListCronJobsCreation ( ) ; if ( empty ( $ cronjobsList ) ) { return true ; } $ output = [ ] ; $ exitCode = - 1 ; $ cmd = 'crontab -u ' . $ apacheUser . ' -l 2>/dev/null' ; exec ( $ cmd , $ output , $ exitCode ) ; if ( $ exitCode !== 0 ) { return false ; } if ( empty ( $ output ) ) { return false ; } foreach ( $ cronjobsList as $ cmd => $ time ) { if ( empty ( $ cmd ) ) { continue ; } if ( count ( preg_grep ( '/^[^#]+' . preg_quote ( $ cmd , '/' ) . '$/' , $ output ) ) == 0 ) { return false ; } } return true ; }
Check cron jobs exists

@return bool Success
Check cron jobs exists