1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- namespace App\Console;
- use Illuminate\Console\Scheduling\Schedule;
- use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
- class Kernel extends ConsoleKernel
- {
- /**
- * Define the application's command schedule.
- *
- * @param \Illuminate\Console\Scheduling\Schedule $schedule
- * @return void
- */
- protected function schedule(Schedule $schedule)
- {
- // $schedule->command('inspire')->hourly();
- /**
- * 从掌维同步cp订阅统计数据
- */
- $schedule->command('ContentManage:SyncCpSubscribeStatisticDataFromZW')->dailyAt('13:00');
- /**
- * cp结算月统计
- */
- $schedule->command('ContentManage:CpSubscribeMonthStatisticData', [
- '--month' => date_sub(date_create(), date_interval_create_from_date_string('1 month'))->format('Y-m')
- ])->monthlyOn(1, '15:00');
- /**
- * 版权到期通知,每周一上午9点执行.
- */
- $schedule->command('ContentManage:BookCopyrightAlert')->weekly()->mondays()->at('09:00');
- /**
- * 新的cp方书籍进入内容中台, 通知
- */
- $schedule->command('ContentManage:NewCpBookComeIn')->dailyAt("08:30");
- /**
- * 保存书籍结算模式
- */
- $schedule->command('ContentManage:SaveBookSettlementMode')->daily();
- $schedule->command('ContentManage:cpcollection')->everyMinute();
- }
- /**
- * Register the commands for the application.
- *
- * @return void
- */
- protected function commands()
- {
- $this->load(__DIR__.'/Commands');
- require base_path('routes/console.php');
- }
- }
|