6b688f72e0
Internal cron is now triggered by an axios request from the frontend so it can truly run in a separate request. Fixes #167
32 lines
793 B
PHP
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();
|
|
}
|
|
}
|