diff --git a/src/Service.php b/src/Service.php index 946a7e3..8b515df 100644 --- a/src/Service.php +++ b/src/Service.php @@ -60,7 +60,8 @@ function __construct(array $config) */ public function scheduledCommand(Event $event) { - $eventCommand = explode("'artisan' ", $event->command)[1]; + preg_match("/(artisan |'artisan' )(.*)/us", $event->command, $matches); + $eventCommand = $matches[2]; $event->sendOutputTo(base_path() . '/storage/logs/'.$eventCommand.'.txt'); if (is_null($event->output)) {