Kernel.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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\BindingsCommand;
  12. use App\Console\Commands\ControllerCommand;
  13. use App\Console\Commands\CriteriaCommand;
  14. use App\Console\Commands\EntityCommand;
  15. use App\Console\Commands\InitRecipelsCommand;
  16. use App\Console\Commands\PresenterCommand;
  17. use App\Console\Commands\RepositoryCommand;
  18. use App\Console\Commands\Finance\StatisticalCommand;
  19. use App\Console\Commands\TransformerCommand;
  20. use App\Console\Commands\ValidatorCommand;
  21. use Illuminate\Console\Scheduling\Schedule;
  22. use Laravel\Lumen\Console\Kernel as ConsoleKernel;
  23. class Kernel extends ConsoleKernel
  24. {
  25. /**
  26. * The Artisan commands provided by your application.
  27. *
  28. * @var array
  29. */
  30. protected $commands = [
  31. RepositoryCommand::class,
  32. BindingsCommand::class,
  33. ControllerCommand::class,
  34. CriteriaCommand::class,
  35. EntityCommand::class,
  36. PresenterCommand::class,
  37. TransformerCommand::class,
  38. ValidatorCommand::class,
  39. InitRecipelsCommand::class,
  40. StatisticalCommand::class
  41. ];
  42. /**
  43. * Define the application's command schedule.
  44. *
  45. * @param \Illuminate\Console\Scheduling\Schedule $schedule
  46. */
  47. protected function schedule(Schedule $schedule)
  48. {
  49. $schedule->command('statistical:order')->dailyAt("1:00");
  50. }
  51. }