Kernel.php 2.6 KB

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