response_handler_class; $handler = new $handlerClass($source); $response = $handler->getResponse(); // if it is a 200 if ($response->ok()) { $handler->run(); // if there is an error on the source } else if ($response->serverError()) { } } private function get($url, $handler) { } /** * Define the command's schedule. * * @param \Illuminate\Console\Scheduling\Schedule $schedule * @return void * */ public function schedule(Schedule $schedule): void { $schedule->command(static::class)->everyMinute(); } }