Kernel.php 3.1 KB

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