Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.96 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App\Console;
  4.  
  5. use Illuminate\Console\Scheduling\Schedule;
  6. use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  7.  
  8. class Kernel extends ConsoleKernel
  9. {
  10.     /**
  11.      * The Artisan commands provided by your application.
  12.      *
  13.      * @var array
  14.      */
  15.     protected $commands = [
  16.         // Product commands
  17.         \App\Console\Commands\Products\SyncToShopify::class,
  18.         \App\Console\Commands\Products\SyncDeleted::class,
  19.         \App\Console\Commands\Products\Download::class,
  20.         \App\Console\Commands\Products\Inactivate::class,
  21.  
  22.  
  23.         \App\Console\Commands\Inventory\SyncInventory::class,
  24.         \App\Console\Commands\Inventory\ClearBin::class,
  25.         \App\Console\Commands\Inventory\ClearInventory::class,
  26.  
  27.         \App\Console\Commands\Collections\SyncToShopify::class,
  28.         \App\Console\Commands\Collections\SyncDeleted::class,
  29.         \App\Console\Commands\Collections\Download::class,
  30.  
  31.         \App\Console\Commands\CollectionProducts\SyncToShopify::class,
  32.         \App\Console\Commands\CollectionProducts\SyncDeleted::class,
  33.  
  34.         \App\Console\Commands\Orders\Download::class,
  35.         \App\Console\Commands\Orders\Refund::class,
  36.         \App\Console\Commands\Orders\RefundMoney::class,
  37.         \App\Console\Commands\Orders\Cancel::class,
  38.         \App\Console\Commands\Orders\Upload::class,
  39.  
  40.         \App\Console\Commands\Dailydeals\SwitchDeals::class,
  41.  
  42.         \App\Console\Commands\Shipments\CreateScanForm::class,
  43.         \App\Console\Commands\Shipments\Correct::class
  44.     ];
  45.  
  46.     /**
  47.      * Define the application's command schedule.
  48.      *
  49.      * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  50.      * @return void
  51.      */
  52.     protected function schedule(Schedule $schedule)
  53.     {
  54.         // @ORDERS
  55.         // Download orders
  56.         $schedule->command('orders:download')->everyMinute()->withoutOverlapping();
  57.         // Inform customer of tracking number
  58.         $schedule->command('orders:upload')->everyTenMinutes()->withoutOverlapping();
  59.         // Cancel pending orders
  60.         $schedule->command('orders:cancel')->hourly()->withoutOverlapping();
  61.         // @PRODUCTS|VARIANTS
  62.         // sync any products that need syncing
  63.         $schedule->command('products:sync')->everyThirtyMinutes()->withoutOverlapping();
  64.         // delete any products that need deleting
  65.         $schedule->command('products:delete')->everyThirtyMinutes()->withoutOverlapping();
  66.         // Delete any variants that need deleting
  67.         // $schedule->command('variants:delete')
  68.         //         ->everyTenMinutes()
  69.         //        ->withoutOverlapping();
  70.  
  71.         // @INVENTORY
  72.         // Sync any inventory
  73.         $schedule->command('inventory:sync')->hourly()->withoutOverlapping();
  74.  
  75.         // @COLLECTIONS
  76.         // sync any collections that need syncing
  77.         $schedule->command('collections:sync')->everyFiveMinutes()->withoutOverlapping();
  78.         // delete any collections that need deleting
  79.         $schedule->command('collections:delete')->everyTenMinutes()->withoutOverlapping();
  80.         // sync any collection products that need syncing
  81.         $schedule->command('collectionproducts:sync')->everyFiveMinutes()->withoutOverlapping();
  82.         // delete any collection products that need deleting
  83.         $schedule->command('collectionproducts:delete')->everyFiveMinutes()->withoutOverlapping();
  84.  
  85.  
  86.         // // Refund pending orders
  87.         // $schedule->command('orders:refund')
  88.         //          ->everyTenMinutes()
  89.         //          ->withoutOverlapping();
  90.         // $schedule->command('orders:refund_money')
  91.         //          ->everyTenMinutes()
  92.         //          ->withoutOverlapping();
  93.         // Command to switch deals at noon
  94.         $schedule->command('deals:switch')->dailyAt('12:00')->withoutOverlapping();
  95.         // Command to print a scan form at 9pm and print it
  96.         $schedule->command('shipments:scanform')->dailyAt('21:00')->withoutOverlapping();
  97.  
  98.     }
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement