public function actionLs($params = false){
        /**
         * @var $cron Crontab
         */

        if(false == $params) {

            $cron = $this->module->get($this->module->nameComponent);
            $jobs = $cron->getJobs();

            foreach ($jobs as $index=>$job) {
                /**
                 * @var $job Cronjob
                 */
                if($job->getGroup() == $this->module->cronGroup)
                echo '['.$index.'] '. $this->ansiFormat($job->getJobCommand(), Console::FG_CYAN);
            }
        } elseif($params == 'a' || $params == 'al') {
            echo shell_exec('crontab -l') . PHP_EOL;
        }

    }
public function actionLs($params = false){
        /**
         * @var $cron Crontab
         */

        if(false == $params) {

            $cron = $this->module->get($this->module->nameComponent);
            $jobs = $cron->getJobs();

            foreach ($jobs as $index=>$job) {
                /**
                 * @var $job Cronjob
                 */
                if($job->getGroup() == $this->module->cronGroup)
                echo '['.$index.'] '. $this->ansiFormat($job->getJobCommand(), Console::FG_CYAN);
            }
        } elseif($params == 'a' || $params == 'al') {
            echo shell_exec('crontab -l') . PHP_EOL;
        }

    }
public function actionLs ( $ params = false ) { /**
         * @var $cron Crontab
         */ if ( false == $ params ) { $ cron = $ this -> module -> get ( $ this -> module -> nameComponent ) ; $ jobs = $ cron -> getJobs ( ) ; foreach ( $ jobs as $ index => $ job ) { /**
                 * @var $job Cronjob
                 */ if ( $ job -> getGroup ( ) == $ this -> module -> cronGroup ) echo '[' . $ index . '] ' . $ this -> ansiFormat ( $ job -> getJobCommand ( ) , Console :: FG_CYAN ) ; } } elseif ( $ params == 'a' || $ params == 'al' ) { echo shell_exec ( 'crontab -l' ) . PHP_EOL ; } }
List Application Cron Jobs; a|al All jobs
@param string $params
@throws \yii\base\InvalidConfigException
List Application Cron Jobs ; a|al All jobs