48 lines
1.3 KiB
PHP
48 lines
1.3 KiB
PHP
<?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 = [
|
|
Commands\resetRoleDaily::class,
|
|
Commands\updateJbg::class,
|
|
Commands\updateOnline::class,
|
|
Commands\ResetRoleAsal::class,
|
|
];
|
|
|
|
/**
|
|
* Define the application's command schedule.
|
|
*
|
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
|
* @return void
|
|
*/
|
|
protected function schedule(Schedule $schedule)
|
|
{
|
|
$schedule->command('reset:dailyrole')->daily()->timezone('Asia/Kuala_Lumpur')->at('00:01');
|
|
$schedule->command('update:jbg')->daily()->timezone('Asia/Kuala_Lumpur')->at('00:01');
|
|
$schedule->command('reset:roleasal')->daily()->timezone('Asia/Kuala_Lumpur')->at('00:01');
|
|
$schedule->command('update:online')->daily()->timezone('Asia/Kuala_Lumpur')->everyFifteenMinutes();
|
|
}
|
|
|
|
/**
|
|
* Register the commands for the application.
|
|
*
|
|
* @return void
|
|
*/
|
|
protected function commands()
|
|
{
|
|
$this->load(__DIR__.'/Commands');
|
|
|
|
require base_path('routes/console.php');
|
|
}
|
|
}
|