Files
Caramel-CRM/app/Console/Kernel.php
T
vollstock c470240dc0 Fix: Job to check invoice due dates was never run
Made it a command so it runs with the scheduler
2026-03-05 10:42:40 +01:00

45 lines
1.1 KiB
PHP

<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* Register the Artisan commands for the application.
*
* @var array
*/
protected $commands = [
\App\Console\Commands\CaldavSyncCommand::class,
\App\Console\Commands\CheckInvoiceDueDatesCommand::class,
];
/**
* Define the application's command schedule.
*/
protected function schedule(Schedule $schedule): void
{
$schedule->command('caldav:sync')
->everyMinute()
->withoutOverlapping();
// Run synchronously on schedule to support environments without queue workers
$schedule->command('invoices:check-due')
->dailyAt('3:00')
->withoutOverlapping();
}
/**
* Register the commands for the application.
*/
protected function commands(): void
{
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}
}