File: D:/HostingSpaces/netwerkbrabant/netwerkbrabant.nl/app/Console/Kernel.php
<?php
namespace App\Console;
use App\Console\Commands\IndexSearch;
use App\Console\Commands\SyncWeFactEvents;
use Carbon\Carbon;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
use Illuminate\Support\Facades\Log;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
IndexSearch::class,
SyncWeFactEvents::class
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
//Run the queue listener every hour, if it is still running, do nothing
// $schedule->command('kms:housekeeper')->dailyAt('04:00'); //Does housekeeping. Cleaning up old stuff and such.
// $schedule->command('shop:catalog')->dailyAt('03:00'); //Update the shop catalog index
// $schedule->call(function (){
// Log::info(self::class.': Has runned the schedule at: ' . Carbon::now()->format('Y-m-d H:i:s'));
// })->everyMinute();
//
// $schedule->call(function (){
// Log::info(self::class.': Has runned 2 the schedule at: ' . Carbon::now()->format('Y-m-d H:i:s'));
// })->everyMinute();
$schedule->command('wefact:sync')->hourly();
$schedule->command('queue:work')->everyFiveMinutes()->withoutOverlapping();
$schedule->command('search:index')->dailyAt('04:00'); //Create a search database.
}
}