2021-04-02 19:48:41 +08:00
|
|
|
<?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)
|
|
|
|
|
{
|
2021-04-29 19:18:13 +08:00
|
|
|
$schedule->command('exam:assign_cronjob')->everyMinute();
|
|
|
|
|
$schedule->command('exam:checkout_cronjob')->everyMinute();
|
2021-05-15 01:24:44 +08:00
|
|
|
$schedule->command('backup:cronjob')->everyMinute();
|
2021-06-22 12:56:03 +08:00
|
|
|
$schedule->command('hr:update_status')->everyMinute();
|
2022-03-28 19:52:10 +08:00
|
|
|
$schedule->command('hr:update_status --ignore_time=1')->hourly();
|
2022-02-28 23:20:42 +08:00
|
|
|
$schedule->command('user:delete_expired_token')->dailyAt('04:00');
|
2021-04-02 19:48:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Register the commands for the application.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
protected function commands()
|
|
|
|
|
{
|
|
|
|
|
$this->load(__DIR__.'/Commands');
|
|
|
|
|
|
|
|
|
|
require base_path('routes/console.php');
|
|
|
|
|
}
|
|
|
|
|
}
|