Kernel.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /*
  3. * This file is part of the Jiannei/lumen-api-starter.
  4. *
  5. * (c) Jiannei <longjian.huang@foxmail.com>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. namespace App\Console;
  11. use App\Console\Commands\Base\InitSettingCommand;
  12. use App\Console\Commands\Base\RemoveModuleCommand;
  13. use App\Console\Commands\Base\RemoveModuleControllerCommand;
  14. use App\Console\Commands\Dwbs\MakeDataCommand;
  15. use App\Console\Commands\Dwbs\MakeStatisticalResourceCommand;
  16. use App\Console\Commands\Dwbs\StatisticalUserCommand;
  17. use App\Console\Commands\InitPermissionsCommand;
  18. use App\Console\Commands\LoadlogsCommand;
  19. use App\Console\Commands\TestCommand;
  20. use Illuminate\Console\Scheduling\Schedule;
  21. use Laravel\Lumen\Console\Kernel as ConsoleKernel;
  22. class Kernel extends ConsoleKernel
  23. {
  24. /**§
  25. * The Artisan commands provided by your application.
  26. *
  27. * @var array
  28. */
  29. protected $commands = [
  30. TestCommand::class,
  31. InitPermissionsCommand::class,
  32. // InitSettingCommand::class,
  33. // RemoveModuleCommand::class,
  34. // RemoveModuleControllerCommand::class,
  35. LoadlogsCommand::class,
  36. MakeDataCommand::class,
  37. MakeStatisticalResourceCommand::class,
  38. StatisticalUserCommand::class
  39. ];
  40. /**
  41. * Define the application's command schedule.
  42. *
  43. * @param \Illuminate\Console\Scheduling\Schedule $schedule
  44. */
  45. protected function schedule(Schedule $schedule)
  46. {
  47. $schedule->command(StatisticalUserCommand::class)->dailyAt("00:10");
  48. //todo:生成学霸和排行榜图片(暂时关闭)
  49. // $schedule->command(MakeStatisticalResourceCommand::class)->dailyAt("02:10");
  50. }
  51. }