2025-11-11 21:20:15 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
2025-12-03 14:23:03 +01:00
|
|
|
use Illuminate\Support\Facades\Schedule;
|
|
|
|
|
use App\Jobs\CheckInvoiceDueDatesJob;
|
2025-11-11 21:20:15 +01:00
|
|
|
|
|
|
|
|
class EventServiceProvider extends ServiceProvider
|
|
|
|
|
{
|
2025-12-03 14:23:03 +01:00
|
|
|
protected $listen = [];
|
2025-11-11 21:20:15 +01:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Bootstrap services.
|
|
|
|
|
*/
|
|
|
|
|
public function boot(): void
|
|
|
|
|
{
|
|
|
|
|
parent::boot();
|
2025-12-03 14:23:03 +01:00
|
|
|
|
2025-12-07 12:55:33 +01:00
|
|
|
// // TODO: read where to put these or ask in the forums
|
|
|
|
|
// // it seems to work here, but where is the apropriate place?
|
|
|
|
|
// // Kernel::schedule did not work
|
2025-12-03 14:23:03 +01:00
|
|
|
Schedule::command('caldav:sync')
|
|
|
|
|
->everyMinute()
|
|
|
|
|
->withoutOverlapping();
|
|
|
|
|
|
|
|
|
|
Schedule::job(new CheckInvoiceDueDatesJob())
|
|
|
|
|
->daily()
|
|
|
|
|
->withoutOverlapping();
|
2025-11-11 21:20:15 +01:00
|
|
|
}
|
|
|
|
|
}
|