publishes([ __DIR__ . '/../config' => \config_path(), ], 'config'); if (\config('refresh-sitemap.schedule', false)) { $this->app->booted(function () { /** @var \Illuminate\Console\Scheduling\Schedule $schedule */ $schedule = app(Schedule::class); $schedule->job(GenerateSitemap::class) ->cron(\config('refresh-sitemap.cron', '45 15 * * *')); }); } } /** * Register any application services. * * @return void */ public function register(): void { $this->mergeConfigFrom( \sprintf('%s/../config/refresh-sitemap.php', __DIR__), 'refresh-sitemap' ); $this->commands([ RefreshSitemap::class ]); } }