Files
kaunter/app/Console/Kernel.php
T
Afiq Zakwan a4559f0180 cron job
2021-07-08 09:09:51 +08:00

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');
}
}