Skip to content

Commit f00cd8d

Browse files
committed
Add scheduler
1 parent e6df8f7 commit f00cd8d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

config/app.php

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

1616
'name' => env('APP_NAME', 'Laravel'),
1717

18+
'heartbeat_url' => env('HEARTBEAT_URL'),
19+
1820
/*
1921
|--------------------------------------------------------------------------
2022
| Application Environment

routes/console.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
use Illuminate\Foundation\Inspiring;
44
use Illuminate\Support\Facades\Artisan;
5+
use Illuminate\Support\Facades\Schedule;
56

67
Artisan::command('inspire', function () {
78
$this->comment(Inspiring::quote());
89
})->purpose('Display an inspiring quote');
10+
11+
Schedule::command('inspire')->everyMinute()->thenPing(config('app.heartbeat_url'));

0 commit comments

Comments
 (0)