Files

45 lines
1.1 KiB
PHP
Raw Permalink Normal View History

2025-12-02 17:32:52 +01:00
<?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,
2025-12-02 17:32:52 +01:00
];
/**
* 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();
2025-12-02 17:32:52 +01:00
}
/**
* Register the commands for the application.
*/
protected function commands(): void
{
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}
}