12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace App\Console;
- use Illuminate\Console\Scheduling\Schedule;
- use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
- class Kernel extends ConsoleKernel
- {
- /**
- * The Artisan commands provided by your application.
- *
- * @var array
- */
- protected $commands = [
- //
- ];
- /**
- * Define the application's command schedule.
- *
- * @param \Illuminate\Console\Scheduling\Schedule $schedule
- * @return void
- */
- protected function schedule(Schedule $schedule)
- {
- // 微伴同步客户信息
- $schedule->command('staff_relation')->runInBackground();
- $schedule->command('staff_remark')->runInBackground();
- $schedule->command('tag_relation')->runInBackground();
- // 微伴标签列表同步
- $schedule->command('weiban_taglist')->runInBackground();
- // 产品限购自动下架
- $schedule->command('product_delist')->everyMinute();
- //拼团活动
- $schedule->command('regiment')->everyMinute();
- // 优惠券提醒
- $schedule->command('coupon_notice')->dailyAt('15:00');
- // 优惠券提醒
- $schedule->command('orders_notice')->dailyAt('07:00');
- }
- /**
- * Register the commands for the application.
- *
- * @return void
- */
- protected function commands()
- {
- // 自动引入任务命令
- $this->load(__DIR__.'/Commands');
- // 引入任务路由
- require base_path('routes/console.php');
- }
- }
|