Kernel.php 2.9 KB

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