Skip to content

Commit

Permalink
Update installation-and-setup.md
Browse files Browse the repository at this point in the history
Laravel 11 update
  • Loading branch information
xnekv03 authored Sep 16, 2024
1 parent 543d72f commit ddb682e
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions docs/installation-and-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,16 @@ php artisan migrate

After you have performed the basic installation you can check the uptime and ssl certificates of sites using the `monitor:check-uptime` and `monitor:check-certificate` commands. In most cases you'll want to schedule them. We recommend that you run the uptime check every minute and the ssl certificate check daily.

You can schedule the commands, like any other command, in the console Kernel.
You can schedule the commands, like any other command, in the `routes/console.php` file.

```php
// app/Console/Kernel.php
// routes/console.php

protected function schedule(Schedule $schedule)
{
$schedule->command('monitor:check-uptime')->everyMinute();
$schedule->command('monitor:check-certificate')->daily();
}
use Illuminate\Support\Facades\Schedule;
use Spatie\UptimeMonitor\Commands\CheckCertificates;
use Spatie\UptimeMonitor\Commands\CheckUptime;


Schedule::command(CheckUptime::class)->everyMinute();
Schedule::command(CheckCertificates::class)->daily();
```

0 comments on commit ddb682e

Please sign in to comment.