/** * Get all commands that are scheduled * * @return \Indatus\Dispatcher\Scheduling\ScheduledCommandInterface[] */ public function getScheduledCommands() { $scheduledCommands = []; foreach ($this->console->all() as $command) { if ($command instanceof ScheduledCommandInterface) { $scheduledCommands[] = $command; } } return $scheduledCommands; }