Files
Caramel-CRM/app/Providers/EventServiceProvider.php
T
vollstock 6b688f72e0 [Fix] Internal cron scheduler blocking view responses
Internal cron is now triggered by an axios request from the frontend so it can truly run in a separate request. Fixes #167
2025-12-07 12:55:33 +01:00

32 lines
793 B
PHP

<?php
namespace App\Providers;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Schedule;
use App\Jobs\CheckInvoiceDueDatesJob;
class EventServiceProvider extends ServiceProvider
{
protected $listen = [];
/**
* Bootstrap services.
*/
public function boot(): void
{
parent::boot();
// // 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
Schedule::command('caldav:sync')
->everyMinute()
->withoutOverlapping();
Schedule::job(new CheckInvoiceDueDatesJob())
->daily()
->withoutOverlapping();
}
}