Kernel.php 2.7 KB
<?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('sync_file')->everyThirtyMinutes()->withoutOverlapping(1);//每半小时执行同步
        // 每日更新最新模块
        $schedule->command('template_label')->dailyAt('01:00')->withoutOverlapping(1);//最新模块
        $schedule->command('popular_template_label')->dailyAt('01:30')->withoutOverlapping(1);//热门模块
        $schedule->command('rank_data_task')->everyMinute()->withoutOverlapping(1); // 排名数据更新任务
        $schedule->command('service_count')->dailyAt('01:00')->withoutOverlapping(1); //服务器使用情况,每天凌晨1点执行一次
        $schedule->command('sync_channel')->dailyAt('06:00')->withoutOverlapping(1); // 渠道信息,每天执行一次
        $schedule->command('inquiry_count')->dailyAt('01:00')->withoutOverlapping(1); // 询盘统计数据,每天凌晨执行一次
        $schedule->command('share_user')->dailyAt('01:20')->withoutOverlapping(1);// 每天凌晨1点执行一次
        $schedule->command('last_inquiry')->dailyAt('04:00')->withoutOverlapping(1);// 最近一次询盘信息
        $schedule->command('update_seo_tdk_crontab')->dailyAt('20:00')->withoutOverlapping(1); //更新上线项目TDK
        $schedule->command('sync_manager')->dailyAt('01:00')->withoutOverlapping(1); //TODO::手机号码同步  每天执行一次
        $schedule->command('update_keyword_route')->dailyAt('01:00')->withoutOverlapping(1); //升级项目--清除路由相同的关键字
//        $schedule->command('recommended_suppliers')->dailyAt('03:00')->withoutOverlapping(1); //每天凌晨1点执行一次生成推荐商
        $schedule->command('update_keyword_content')->hourly()->withoutOverlapping(1);
        // 每日推送已完成视频任务项目生成对应界面
        //更新AI站点数据
        $schedule->command('updateAiProjects')->everyFourHours()->withoutOverlapping(1);
        //每日同步询盘文案
        $schedule->command('sync_inquiry_text')->dailyAt('09:00')->withoutOverlapping(1);
        //FB询盘费用同步
        $schedule->command('sync_ad_cost')->everyThirtyMinutes()->withoutOverlapping(1);
    }

    /**
     * Register the commands for the application.
     *
     * @return void
     */
    protected function commands()
    {
        $this->load(__DIR__.'/Commands');

        require base_path('routes/console.php');
    }
}