zqSchedule($schedule); $this->lqSchedule($schedule); $this->dltSchedule($schedule); $this->qxcSchedule($schedule); $this->plsSchedule($schedule); $this->plwSchedule($schedule); $this->bjdcSchedule($schedule); $this->reportSchedule($schedule); $this->genSchedule($schedule); $this->orderSchedule($schedule); $this->optimizeSchedule($schedule); //代理提成统计 $schedule->command('ShopAgentBillCommand')->dailyAt('05:08')->runInBackground()->withoutOverlapping(5); // 自动删除lottery图片目录 $schedule->command('AutoRemoveLotteryFile') ->daily() ->runInBackground() ->withoutOverlapping(); } protected function optimizeSchedule(Schedule $schedule) { $schedule->command('optimize:bills') ->daily() ->runInBackground() ->withoutOverlapping() ->description('流水相关优化'); $schedule->command('optimize:feedback') ->daily() ->runInBackground() ->withoutOverlapping() ->description('反馈相关优化'); $schedule->command('optimize:order') ->daily() ->runInBackground() ->withoutOverlapping() ->description('订单相关优化'); $schedule->command('optimize:report') ->daily() ->runInBackground() ->withoutOverlapping() ->description('订单相关优化'); } protected function orderSchedule(Schedule $schedule) { $schedule->command('order:cancel_refund') ->everyTenMinutes() ->runInBackground() ->withoutOverlapping() ->description('取消已支付且未接单/未出票的订单'); $schedule->command('order:delete_unpay') ->everyTwoHours() ->runInBackground() ->withoutOverlapping() ->description('删除未支付且已超时的订单'); $schedule->command('order:delete_unpay') ->daily() ->runInBackground() ->withoutOverlapping() ->description('自动删除45天之前的订单数据'); } protected function genSchedule(Schedule $schedule) { $schedule->command('gen:customer_ranking') ->everyFourHours() ->runInBackground() ->withoutOverlapping() ->description('生成用户排名榜'); } protected function dltSchedule(Schedule $schedule) { $schedule->command('dlt:sync_dlt_result') ->dailyAt('21:40') ->runInBackground() ->withoutOverlapping() ->description('获取大乐透开奖结果'); $schedule->command('dlt:sync_dlt_result') ->dailyAt('21:50') ->runInBackground() ->withoutOverlapping() ->description('获取大乐透开奖结果'); $schedule->command('dlt:sync_dlt_result') ->dailyAt('21:55') ->runInBackground() ->withoutOverlapping() ->description('获取大乐透开奖结果'); $schedule->command('dlt:sync_dlt_result') ->dailyAt('22:20') ->runInBackground() ->withoutOverlapping() ->description('获取大乐透开奖结果'); $schedule->command('dlt:sync_dlt_result') ->dailyAt('23:10') ->runInBackground() ->withoutOverlapping() ->description('获取大乐透开奖结果'); $schedule->command('dlt:sync_dlt_issue') ->everyFiveMinutes() ->runInBackground() ->withoutOverlapping() ->description('获取大乐透下期投注信息'); } protected function qxcSchedule(Schedule $schedule) { $schedule->command('qxc:sync_qxc_result') ->dailyAt('21:40') ->runInBackground() ->withoutOverlapping() ->description('获取qxc开奖结果'); $schedule->command('qxc:sync_qxc_result') ->dailyAt('21:50') ->runInBackground() ->withoutOverlapping() ->description('获取qxc开奖结果'); $schedule->command('qxc:sync_qxc_result') ->dailyAt('21:55') ->runInBackground() ->withoutOverlapping() ->description('获取qxc开奖结果'); $schedule->command('qxc:sync_qxc_result') ->dailyAt('22:20') ->runInBackground() ->withoutOverlapping() ->description('获取qxc开奖结果'); $schedule->command('qxc:sync_qxc_issue') ->everyFiveMinutes() ->runInBackground() ->withoutOverlapping() ->description('获取qxc下期投注信息'); } protected function plsSchedule(Schedule $schedule) { $schedule->command('pls:sync_pls_result') ->dailyAt('21:40') ->runInBackground() ->withoutOverlapping() ->description('获取pls开奖结果'); $schedule->command('pls:sync_pls_result') ->dailyAt('21:50') ->runInBackground() ->withoutOverlapping() ->description('获取pls开奖结果'); $schedule->command('pls:sync_pls_result') ->dailyAt('21:55') ->runInBackground() ->withoutOverlapping() ->description('获取pls开奖结果'); $schedule->command('pls:sync_pls_result') ->dailyAt('22:20') ->runInBackground() ->withoutOverlapping() ->description('获取pls开奖结果'); $schedule->command('pls:sync_pls_result') ->dailyAt('23:10') ->runInBackground() ->withoutOverlapping() ->description('获取pls开奖结果'); $schedule->command('pls:sync_pls_issue') ->everyFiveMinutes() ->runInBackground() ->withoutOverlapping() ->description('获取pls下期投注信息'); } protected function plwSchedule(Schedule $schedule) { $schedule->command('plw:sync_plw_result') ->dailyAt('21:40') ->runInBackground() ->withoutOverlapping() ->description('获取plw开奖结果'); $schedule->command('plw:sync_plw_result') ->dailyAt('21:50') ->runInBackground() ->withoutOverlapping() ->description('获取plw开奖结果'); $schedule->command('plw:sync_plw_result') ->dailyAt('21:55') ->runInBackground() ->withoutOverlapping() ->description('获取plw开奖结果'); $schedule->command('plw:sync_plw_result') ->dailyAt('22:20') ->runInBackground() ->withoutOverlapping() ->description('获取plw开奖结果'); $schedule->command('plw:sync_plw_result') ->dailyAt('23:10') ->runInBackground() ->withoutOverlapping() ->description('获取plw开奖结果'); $schedule->command('plw:sync_plw_issue') ->everyFiveMinutes() ->runInBackground() ->withoutOverlapping() ->description('获取plw下期投注信息'); } protected function reportSchedule(Schedule $schedule) { $schedule->command('report:generate_day_win') ->everyMinute() ->runInBackground() ->withoutOverlapping() ->description('彩民每日中奖统计'); $schedule->command('report:generate_day_seller') ->daily() ->runInBackground() ->withoutOverlapping() ->description('店员每日统计'); $schedule->command('report:generate_day_shop') ->daily() ->runInBackground() ->withoutOverlapping() ->description('店铺每日统计'); } protected function lqSchedule(Schedule $schedule) { $schedule->command('lq:sync_competition') ->hourly() ->runInBackground() ->withoutOverlapping() ->description(''); $schedule->command('lq:sync_jclq_odds') ->everyMinute() ->runInBackground() ->withoutOverlapping() ->description('竞彩篮球赔率数据'); $schedule->command('lq:sync_jclq_score') ->everyMinute() ->runInBackground() ->withoutOverlapping() ->description('实时篮球比分数据'); $schedule->command('lq:sync_jclq_result') ->everyMinute() ->runInBackground() ->withoutOverlapping() ->description('篮球开奖结果'); $schedule->command('lq:sync_lq_company') ->everyTwoHours() ->runInBackground() ->withoutOverlapping() ->description('公司'); $schedule->command('lq:sync_lq_season') ->everyTwoHours() ->runInBackground() ->withoutOverlapping() ->description('赛季'); $schedule->command('lq:sync_lq_match') ->everyTwoHours() ->runInBackground() ->withoutOverlapping() ->description('比赛'); $schedule->command('lq:sync_lq_match_change') ->everyMinute() ->runInBackground() ->withoutOverlapping() ->description('赛事变更'); $schedule->command('lq:sync_lq_main_odds') ->everyTenMinutes() ->runInBackground() ->withoutOverlapping() ->description('指数'); } protected function zqSchedule(Schedule $schedule) { $schedule->command('zq:sync_zq_company') ->hourly() ->runInBackground() ->withoutOverlapping() ->description('公司'); $schedule->command('zq:sync_competition') ->hourly() ->runInBackground() ->withoutOverlapping() ->description('赛事'); $schedule->command('zq:sync_match') ->everyTwoHours() ->runInBackground() ->withoutOverlapping() ->description('比赛'); $schedule->command('zq:sync_match_change') ->everyMinute() ->runInBackground() ->withoutOverlapping() ->description('比赛变更'); $schedule->command('zq:sync_team') ->everyThreeHours() ->runInBackground() ->withoutOverlapping() ->description('球队'); $schedule->command('zq:sync_jczq_odds') ->everyMinute() ->runInBackground() ->withoutOverlapping() ->description('实时足球赔率数据'); $schedule->command('zq:sync_score') ->everyMinute() ->runInBackground() ->withoutOverlapping() ->description('实时足球比分数据'); $schedule->command('zq:sync_competition_score') ->everyTenMinutes() ->runInBackground() ->withoutOverlapping() ->description('足球积分排行'); $schedule->command('zq:sync_jczq_result') ->everyMinute() ->runInBackground() ->withoutOverlapping() ->description('开奖结果'); $schedule->command('zq:jczq_result_repair') ->hourly() ->runInBackground() ->withoutOverlapping() ->description('开奖结果修复'); $schedule->command('zq:sync_ctzq') ->everyMinute() ->runInBackground() ->withoutOverlapping() ->description('传统足球'); $schedule->command('zq:sync_zq_main_odds') ->everyTenMinutes() ->runInBackground() ->withoutOverlapping() ->description('指数'); $schedule->command('zq:sync_zq_predict') ->hourly() ->runInBackground() ->withoutOverlapping() ->description(''); $schedule->command('zq:sync_guan') ->everyMinute() ->runInBackground() ->withoutOverlapping() ->description('冠军'); $schedule->command('zq:sync_guan_ya') ->everyMinute() ->runInBackground() ->withoutOverlapping() ->description('冠亚军'); } protected function bjdcSchedule(Schedule $schedule) { $schedule->command('zq:sync_bjdc_odds') ->everyMinute() ->runInBackground() ->withoutOverlapping() ->description('北单赔率数据'); $schedule->command('zq:sync_bjdc_result') ->everyMinute() ->runInBackground() ->withoutOverlapping() ->description('北单结果'); $schedule->command('zq:sync_bjdc_sfgg_odds') ->everyMinute() ->runInBackground() ->withoutOverlapping() ->description('北单胜负过关赔率数据'); $schedule->command('zq:sync_bjdc_sfgg_result') ->everyMinute() ->runInBackground() ->withoutOverlapping() ->description('北单胜负过关结果'); } /** * Register the commands for the application. * * @return void */ protected function commands() { $this->load(__DIR__ . '/Commands'); require base_path('routes/console.php'); } }