diff --git a/src/CollectorServiceProvider.php b/src/CollectorServiceProvider.php index eba9c6f..f009c68 100644 --- a/src/CollectorServiceProvider.php +++ b/src/CollectorServiceProvider.php @@ -47,11 +47,13 @@ public function register() return new Collector; }); - /* Register the scheduler */ - $this->app->booted(function () { - $schedule = app(Schedule::class); - $schedule->job(new BatchMetrics())->everyFiveMinutes(); - }); - + if(config('beacon.enabled')) + { + /* Register the scheduler */ + $this->app->booted(function () { + $schedule = app(Schedule::class); + $schedule->job(new BatchMetrics())->everyFiveMinutes(); + }); + } } }