Kernel.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. namespace App\Console;
  3. use App\Console\Commands\FluxOrderFix;
  4. use App\Console\Commands\InventoryDailyLoggingOwner;
  5. use App\Console\Commands\LogExpireDelete;
  6. use App\Console\Commands\MakeServiceCommand;
  7. use App\Console\Commands\SyncBatchTask;
  8. use App\Console\Commands\SyncLogCacheTask;
  9. use App\Console\Commands\SyncUserVisitMenuLogsCacheTask;
  10. use App\Console\Commands\SyncWMSOrderTask;
  11. use App\Console\Commands\TestTemp;
  12. use App\Console\Commands\WASSyncWMSOrderInformation;
  13. use Illuminate\Console\Scheduling\Schedule;
  14. use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  15. use Illuminate\Foundation\Console\ModelMakeCommand;
  16. class Kernel extends ConsoleKernel
  17. {
  18. /**
  19. * The Artisan commands provided by your application.
  20. *
  21. * @var array
  22. */
  23. protected $commands = [
  24. LogExpireDelete::class,
  25. MakeServiceCommand::class,
  26. FluxOrderFix::class,
  27. InventoryDailyLoggingOwner::class,
  28. WASSyncWMSOrderInformation::class,
  29. SyncLogCacheTask::class,
  30. SyncUserVisitMenuLogsCacheTask::class,
  31. TestTemp::class,
  32. SyncBatchTask::class,
  33. SyncWMSOrderTask::class,
  34. ];
  35. /**
  36. * Define the application's command schedule.
  37. *
  38. * @param \Illuminate\Console\Scheduling\Schedule $schedule
  39. * @return void
  40. */
  41. protected function schedule(Schedule $schedule)
  42. {
  43. $schedule->command('LogExpireDelete')->dailyAt('00:01');
  44. $schedule->command('InventoryDailyLoggingOwner')->dailyAt('08:00');
  45. $schedule->command('FluxOrderFix')->hourlyAt(1);
  46. $schedule->command('WASSyncWMSOrderInformation')->everyMinute();
  47. $schedule->command('syncLogCacheTask')->everyMinute();
  48. $schedule->command('createOwnerReport')->monthlyOn(1);
  49. $schedule->command('createOwnerBillReport')->monthlyOn(1);
  50. $schedule->command('createOwnerAreaReport')->monthlyOn(25);
  51. $schedule->command('sync:batch')->everyMinute();
  52. $schedule->command('sync:order')->everyMinute();
  53. }
  54. /**
  55. * Register the commands for the application.
  56. *
  57. * @return void
  58. */
  59. protected function commands()
  60. {
  61. $this->load(__DIR__ . '/Commands');
  62. $this->app->extend('command.model.make',function(ModelMakeCommand $base,$app){
  63. return new \App\Console\Commands\ModelMakeCommand($app['files']);
  64. });
  65. require base_path('routes/console.php');
  66. }
  67. }