laravel-learn-bbs/app/Console/Kernel.php

45 lines
998 B
PHP
Raw Permalink Normal View History

2017-12-24 14:17:18 +00: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)
{
// $schedule->command('inspire')
// ->hourly();
2018-06-02 10:21:53 +00:00
$schedule->command('larabbs:calculate-active-user')->hourly();
$schedule->command('larabbs:sync-user-actived-at')->dailyAt('00:05');
2017-12-24 14:17:18 +00:00
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}
}