generated from liutk/owl-admin-base
31 lines
895 B
PHP
31 lines
895 B
PHP
<?php
|
|
|
|
namespace App\Console;
|
|
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
|
|
|
class Kernel extends ConsoleKernel
|
|
{
|
|
/**
|
|
* Define the application's command schedule.
|
|
*/
|
|
protected function schedule(Schedule $schedule): void
|
|
{
|
|
$schedule->command(Commands\TaskUpdateCommand::class)->hourly()->runInBackground();
|
|
$schedule->command(Commands\TaskLedgerGenerateCommand::class)->dailyAt('01:00')->runInBackground();
|
|
$schedule->command(Commands\EmployeeSign::class)->dailyAt('02:00')->runInBackground();
|
|
// $schedule->call(fn() => logger('schedule running'))->everyMinute();
|
|
}
|
|
|
|
/**
|
|
* Register the commands for the application.
|
|
*/
|
|
protected function commands(): void
|
|
{
|
|
$this->load(__DIR__.'/Commands');
|
|
|
|
require base_path('routes/console.php');
|
|
}
|
|
}
|