Gets crontab list array

@return array
961038
public function listArray() : Array
    {
        if( ! is_file($this->crontabCommands) )
        {
            return [];
        }

        return Arrays\RemoveElement::element(explode(EOL, file_get_contents($this->crontabCommands)), '');
    }
558465
public function listAction()
    {
        $this->performAccessChecks();

        $crons = $this->cronService->getCrons();

        return $this->render('SmileEzUICronBundle:cron:tab/crons/list.html.twig', [
            'datas' => $crons
        ]);
    }
10868
public function index()
    {
        return [
            'jobsPerMinute' => app(MetricsRepository::class)->jobsProcessedPerMinute(),
            'processes' => $this->totalProcessCount(),
            'queueWithMaxRuntime' => app(MetricsRepository::class)->queueWithMaximumRuntime(),
            'queueWithMaxThroughput' => app(MetricsRepository::class)->queueWithMaximumThroughput(),
            'recentlyFailed' => app(JobRepository::class)->countRecentlyFailed(),
            'recentJobs' => app(JobRepository::class)->countRecent(),
            'status' => $this->currentStatus(),
            'wait' => collect(app(WaitTimeCalculator::class)->calculate())->take(1),
            'periods' => [
                'recentJobs' => config('horizon.trim.recent'),
                'recentlyFailed' => config('horizon.trim.failed'),
            ],
        ];
    }
891052
public function getCrons(): array
    {
        /** @var CronInterface[] $crons */
        $crons = $this->cronService->getCrons();
        /** @var EdgarEzCron[] $ezCrons */
        $ezCrons = $this->repository->listCrons();

        $return = [];
        foreach ($ezCrons as $ezCron) {
            $return[$ezCron->getAlias()] = [
                'alias' => $ezCron->getAlias(),
                'expression' => $ezCron->getExpression(),
                'arguments' => $ezCron->getArguments(),
                'priority' => (int)$ezCron->getPriority(),
                'enabled' => (int)$ezCron->getEnabled() == 1,
            ];
        }

        foreach ($crons as $cron) {
            if (!isset($return[$cron->getAlias()])) {
                $return[$cron->getAlias()] = [
                    'alias' => $cron->getAlias(),
                    'expression' => $cron->getExpression(),
                    'arguments' => $cron->getArguments(),
                    'priority' => (int)$cron->getPriority(),
                    'enabled' => true,
                ];
            }
        }

        return $return;
    }
730302
protected function getListCommands()
    {
        $commands = $this->application->all();
        $commandsArray = array();
        
        foreach ($commands as $command) {
            $commandsArray[] = array(
                'class'   => get_class($command),
                'name'    => $command->getName()
            );
        }
        
        return $commandsArray;
    }
1078036
public static function getStatusList()
    {
        return [
            self::STATUS_OK => 'ok',
            self::STATUS_SENDING => 'sending',
            self::STATUS_PENDING => 'pending',
            self::STATUS_ERROR => 'error',
            self::STATUS_ENCODING => 'encoding',
        ];
    }
211743
public function getList(): array
    {
        $result = [];
        $controllers = Utility::getControllers();

        if (empty($controllers)) {
            return $result;
        }

        foreach ($controllers as $controller) {
            $parts = explode('\\', $controller);
            foreach ($parts as $key => &$part) {
                if ('App' === $part) {
                    unset($parts[$key]);
                    continue;
                }

                $part = str_replace('Controller', '', $part);
                $part = Inflector::humanize(Inflector::underscore($part));
            }

            // remove empty values
            $parts = array_filter($parts);

            $key = App::shortName($controller, 'Controller', 'Controller');
            $value = implode(' - ', $parts);
            $result[$key] = $value;
        }

        // sort by value
        asort($result);

        return $result;
    }
676767
def _get_cron_info():
    '''
    
    '''
    owner = 'root'
    if __grains__['os'] == 'FreeBSD':
        group = 'wheel'
        crontab_dir = '/var/cron/tabs'
    elif __grains__['os'] == 'OpenBSD':
        group = 'crontab'
        crontab_dir = '/var/cron/tabs'
    elif __grains__['os_family'] == 'Solaris':
        group = 'root'
        crontab_dir = '/var/spool/cron/crontabs'
    elif __grains__['os'] == 'MacOS':
        group = 'wheel'
        crontab_dir = '/usr/lib/cron/tabs'
    else:
        group = 'root'
        crontab_dir = '/var/spool/cron'
    return owner, group, crontab_dir
53035
public function getAllEntries()
    {
        if ($this->Using === 'APCu') {
            $Data = apcu_cache_info();
            if (empty($Data['cache_list'])) {
                return [];
            }
            $Output = [];
            foreach ($Data['cache_list'] as $Entry) {
                if (empty($Entry['info'])) {
                    continue;
                }
                $Creation = isset($Entry['creation_time']) ? $Entry['creation_time'] : 0;
                $Entry['Data'] = $this->getEntry($Entry['info']);
                $Output[$Entry['info']] = $Entry['ttl'] > 0 ? [
                    'Data' => $Entry['Data'],
                    'Time' => $Creation + $Entry['ttl']
                ] : $Entry['Data'];
            }
            return $Output;
        }
        if ($this->Using === 'Memcached') {
            $Keys = $this->WorkingData->getAllKeys();
            if ($Keys !== false && $this->WorkingData->getDelayed($Keys)) {
                $Data = $this->WorkingData->fetchAll();
            }
            if (!is_array($Data)) {
                return [];
            }
            $Output = [];
            foreach ($Data as $Entry) {
                if (!is_array($Entry) || !isset($Entry['key'], $Entry['value'], $Entry['cas'])) {
                    continue;
                }
                $Output[$Entry['key']] = ['Data' => $this->unserializeEntry($Entry['value'])];
                if ($Entry['cas'] > 2592000) {
                    $Output[$Entry['key']]['Time'] = $Entry['cas'];
                } else {
                    $Output[$Entry['key']] = $Output[$Entry['key']]['Data'];
                }
            }
            return $Output;
        }
        if ($this->Using === 'Redis') {
            $Keys = $this->WorkingData->keys('*') ?: [];
            $Output = [];
            foreach ($Keys as $Key) {
                $Output[$Key] = $this->unserializeEntry($this->WorkingData->get($Key));
            }
            return $Output;
        }
        if ($this->Using === 'PDO') {
            if ($this->clearExpiredPDO()) {
                $this->Modified = true;
            }
            $PDO = $this->WorkingData->prepare(self::getAllQuery);
            if ($PDO !== false && $PDO->execute()) {
                $Data = $PDO->fetchAll();
                $Output = [];
                foreach ($Data as $Entry) {
                    if (!is_array($Entry) || !isset($Entry['Key'], $Entry['Data'], $Entry['Time'])) {
                        continue;
                    }
                    $Output[$Entry['Key']] = $Entry['Time'] > 0 ? [
                        'Data' => $this->unserializeEntry($Entry['Data']),
                        'Time' => $Entry['Time']
                    ] : $this->unserializeEntry($Entry['Data']);
                }
                return $Output;
            }
            return [];
        }
        if ($Arr = ($this->exposeWorkingDataArray() ?: [])) {
            foreach ($Arr as &$Entry) {
                $Entry = $this->unserializeEntry($Entry);
            }
            return $Arr;
        }
        return [];
    }
188792
public function getLists()
    {
        $settings = CmService::$plugin->getSettings();

        try {
            $auth = array(
                'api_key' => (string)$settings->apiKey);
            $client = new \CS_REST_Clients(
                $settings->clientId,
                $auth);

            $result = $client->get_lists();

            if($result->was_successful()) {
                $body = array();
                foreach ($result->response as $list) {
                    $body[] = $list;
                }
                return [
                    'success' => true,
                    'statusCode' => $result->http_status_code,
                    'body' => $body
                ];
            } else {
                return [
                    'success' => false,
                    'statusCode' => $result->http_status_code,
                    'reason' => $result->response
                ];
            }
        } catch (\Exception $e) {
            return [
                'success' => false,
                'reason' => $e->getMessage()
            ];
        }
    }
992133
public function getShellList()
    {
        $skipFiles = ['app'];
        $hiddenCommands = ['command_list', 'completion'];
        $plugins = Plugin::loaded();
        $shellList = array_fill_keys($plugins, null) + ['CORE' => null, 'app' => null];

        $appPath = App::path('Shell');
        $shellList = $this->_findShells($shellList, $appPath[0], 'app', $skipFiles);

        $appPath = App::path('Command');
        $shellList = $this->_findShells($shellList, $appPath[0], 'app', $skipFiles);

        $skipCore = array_merge($skipFiles, $hiddenCommands, $shellList['app']);
        $corePath = dirname(__DIR__);
        $shellList = $this->_findShells($shellList, $corePath, 'CORE', $skipCore);

        $corePath = dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'Command';
        $shellList = $this->_findShells($shellList, $corePath, 'CORE', $skipCore);

        foreach ($plugins as $plugin) {
            $pluginPath = Plugin::classPath($plugin) . 'Shell';
            $shellList = $this->_findShells($shellList, $pluginPath, $plugin, []);
        }

        return array_filter($shellList);
    }
97850
public function toArray()
    {
        return array(

            'namespace'            => $this->namespace,
            'className'            => $this->className,
            'fileName'             => $this->fileName,
            'callableName'         => $this->callableName,
            'description'          => $this->description,
            'service'              => $this->service,
            'servers'              => $this->servers,
            'iterations'           => $this->iterations,
            'minimumExecutionTime' => $this->minimumExecutionTime,
            'timeout'              => $this->timeout,
            'jobs'                 => $this->jobCollection->toArray(),
        );
    }
915376
protected function getUpdateList()
    {
        $start = [];
        $updates = update_get_update_list();
        foreach ($updates as $module => $update) {
            $start[$module] = $update['start'];
        }

        return $start;
    }
97563
public function getTaskList()
    {
        $tasks = $this->loader->loadTasks();

        return array_map(function (Task $task) {
            return $task->getName();
        }, $tasks);
    }
713612
public function listAction()
    {
        $this->performAccessChecks();

        $crons = $this->cronService->listCronsStatus();
        $cronRows = array();

        foreach ($crons as $cron) {
            $cronRows[] = array(
                'alias' => $cron->getAlias(),
                'queued' => $cron instanceof SmileCron
                    ? ($cron->getQueued() ? $cron->getQueued()->format('d-m-Y H:i') : false)
                    : false,
                'started' => $cron instanceof SmileCron ? ($cron->getStarted()
                    ? $cron->getStarted()->format('d-m-Y H:i') : false)
                    : false,
                'ended' => $cron instanceof SmileCron ? ($cron->getEnded()
                    ? $cron->getEnded()->format('d-m-Y H:i') : false)
                    : false,
                'status' => $cron instanceof SmileCron ? $cron->getStatus() : false
            );
        }

        return $this->render('SmileEzUICronBundle:cron:tab/status/list.html.twig', [
            'datas' => $cronRows
        ]);
    }
178938
public function getMetaData()
    {
        if (count($this->command) == 0) {
            return ['console' => [
                'Command' => 'Command could not be retrieved', ],
            ];
        }
        $commandString = implode(' ', $this->command);
        $primaryCommand = $this->command[0];
        $arguments = [];
        $options = [];
        foreach (array_slice($this->command, 1) as $arg) {
            if (isset($arg[0]) && $arg[0] === '-') {
                $options[] = $arg;
            } else {
                $arguments[] = $arg;
            }
        }
        $data = [
            'Input' => $commandString,
            'Command' => $primaryCommand,
            'Arguments' => $arguments,
            'Options' => $options,
        ];

        return ['console' => $data];
    }
317674
public static function getList($scheduledOnly = false)
    {
        $db = Loader::db();

        if ($scheduledOnly) {
            $q = "SELECT jID FROM Jobs WHERE isScheduled = 1 ORDER BY jDateLastRun, jID";
        } else {
            $q = "SELECT jID FROM Jobs ORDER BY jDateLastRun, jID";
        }
        $r = $db->Execute($q);
        $jobs = array();
        while ($row = $r->FetchRow()) {
            $j = static::getByID($row['jID']);
            if (is_object($j)) {
                $jobs[] = $j;
            }
        }

        return $jobs;
    }