Skip to content

Commit 0498198

Browse files
committed
added env var for scheduling
1 parent 2cc7d56 commit 0498198

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

app/Console/Kernel.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ class Kernel extends ConsoleKernel
2424
*/
2525
protected function schedule(Schedule $schedule)
2626
{
27-
// $schedule->command('inspire')->hourly();
27+
$min = config('app.scheduled');
28+
if(env('IS_DEMO')) {
29+
$schedule->command('migrate:fresh --seed')->cron('*/'. $min .' * * * *');
30+
}
2831
}
2932

3033
/**

config/app.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
return [
44

5+
'scheduled' => env('SCHEDULED_TIME', 15),
6+
57
/*
68
|--------------------------------------------------------------------------
79
| Application Name

0 commit comments

Comments
 (0)