public function actionList()
    {
        $this->importScheduleFile();

        $climate = new CLImate();
        $data = [];
        $row = 0;

        foreach ($this->schedule->getEvents() as $event) {
            $data[] = [
                '#' => ++$row,
                'Task' => $event->getSummaryForDisplay(),
                'Expression' => $event->getExpression(),
                'Command to Run' => is_a($event, CallbackEvent::class)
                    ? $event->getSummaryForDisplay()
                    : $event->command,
                'Next run at' => $this->getNextRunDate($event),
            ];
        }

        $climate->table($data);
    }
public function actionList()
    {
        $this->importScheduleFile();

        $climate = new CLImate();
        $data = [];
        $row = 0;

        foreach ($this->schedule->getEvents() as $event) {
            $data[] = [
                '#' => ++$row,
                'Task' => $event->getSummaryForDisplay(),
                'Expression' => $event->getExpression(),
                'Command to Run' => is_a($event, CallbackEvent::class)
                    ? $event->getSummaryForDisplay()
                    : $event->command,
                'Next run at' => $this->getNextRunDate($event),
            ];
        }

        $climate->table($data);
    }
public function actionList ( ) { $ this -> importScheduleFile ( ) ; $ climate = new CLImate ( ) ; $ data = [ ] ; $ row = 0 ; foreach ( $ this -> schedule -> getEvents ( ) as $ event ) { $ data [ ] = [ '#' => ++ $ row , 'Task' => $ event -> getSummaryForDisplay ( ) , 'Expression' => $ event -> getExpression ( ) , 'Command to Run' => is_a ( $ event , CallbackEvent :: class ) ? $ event -> getSummaryForDisplay ( ) : $ event -> command , 'Next run at' => $ this -> getNextRunDate ( $ event ) , ] ; } $ climate -> table ( $ data ) ; }
Render list of registered tasks
Render list of registered tasks