<?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. */ protected function schedule(Schedule $schedule): void { /** * 刷新微信小程序的accessToken */ $schedule->command('Miniprogram:WechatAccessToken')->everyMinute(); // $schedule->command('inspire')->hourly(); //每月24号执行创建表 $schedule->command('create_track_table')->monthlyOn(24); } /** * Register the commands for the application. */ protected function commands(): void { $this->load(__DIR__.'/Commands'); require base_path('routes/console.php'); } }