Re-register scheduled commands

This commit is contained in:
Shift
2024-03-18 16:13:33 +00:00
parent 61dbe3c8a4
commit 339973644a
2 changed files with 7 additions and 29 deletions

View File

@@ -1,29 +0,0 @@
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* Define the application's command schedule.
*/
protected function schedule(Schedule $schedule): void
{
$schedule->command('db:seed --force')->twiceDaily(1, 13)->timezone('Europe/Amsterdam');
$schedule->command('sitemap:generate')->weekly();
}
/**
* Register the commands for the application.
*/
protected function commands(): void
{
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}
}

View File

@@ -1,5 +1,7 @@
<?php <?php
use Illuminate\Support\Facades\Schedule;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@@ -11,3 +13,8 @@
| simple approach to interacting with each command's IO methods. | simple approach to interacting with each command's IO methods.
| |
*/ */
Schedule::command('db:seed --force')->twiceDaily(1, 13)->timezone('Europe/Amsterdam');
Schedule::command('sitemap:generate')->weekly();