Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
67 righe
1.8 KiB
67 righe
1.8 KiB
<?php |
|
|
|
namespace App\Console; |
|
|
|
use Illuminate\Console\Scheduling\Schedule; |
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel; |
|
|
|
class Kernel extends ConsoleKernel |
|
{ |
|
/** |
|
* The Artisan commands provided by your application. |
|
* |
|
* @var array |
|
*/ |
|
protected $commands = [ |
|
// |
|
]; |
|
|
|
/** |
|
* Define the application's command schedule. |
|
* |
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule |
|
* @return void |
|
*/ |
|
protected function schedule(Schedule $schedule) |
|
{ |
|
|
|
$schedule->command('communications:sync-2') |
|
->everyThreeHours() |
|
// ->between("18:00", "06:00") |
|
// ->timezone('Europe/Rome') |
|
->hourly() |
|
->environments('production') |
|
->withoutOverlapping() |
|
->appendOutputTo(\storage_path("logs/scheduler-" . date('Y-m-d') . ".log")); |
|
|
|
$schedule->command('job:check') |
|
->twiceDaily(9, 16) |
|
->withoutOverlapping(); |
|
|
|
$schedule->command('queue:restart') |
|
->everyFifteenMinutes() |
|
->runInBackground() |
|
->environments('production') |
|
->withoutOverlapping(); |
|
|
|
$schedule->command('export:check-tenant-export-requests') |
|
->hourly() |
|
->runInBackground() |
|
->environments('production') |
|
->withoutOverlapping() |
|
->appendOutputTo(\storage_path("logs/exporter-" . date('Y-m-d') . ".log")); |
|
|
|
} |
|
|
|
/** |
|
* Register the commands for the application. |
|
* |
|
* @return void |
|
*/ |
|
protected function commands() |
|
{ |
|
$this->load(__DIR__.'/Commands'); |
|
|
|
require base_path('routes/console.php'); |
|
} |
|
}
|
|
|