Skip to content

Commit 653ec8a

Browse files
committed
Change schedule running
1 parent 69d21f4 commit 653ec8a

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

routes/console.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/CachetCoreServiceProvider.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,6 @@ private function registerBladeComponents(): void
168168
private function registerCommands(): void
169169
{
170170
if ($this->app->runningInConsole()) {
171-
$this->loadRoutesFrom(__DIR__.'/../routes/console.php');
172-
173171
$this->commands([
174172
Commands\MakeUserCommand::class,
175173
Commands\SendBeaconCommand::class,
@@ -196,8 +194,14 @@ private function registerSchedules(): void
196194

197195
$this->app->booted(function () {
198196
$schedule = $this->app->make(\Illuminate\Console\Scheduling\Schedule::class);
197+
$demoMode = fn () => Cachet::demoMode();
199198

200199
$schedule->command('cachet:beacon')->daily();
200+
201+
$schedule->command('db:seed', [
202+
'--class' => \Cachet\Database\Seeders\DatabaseSeeder::class,
203+
'--force' => true,
204+
])->everyThirtyMinutes()->when($demoMode);
201205
});
202206
}
203207

0 commit comments

Comments
 (0)