command('inspire')->hourly(); $schedule->command('order-items:create-daily')->everyMinute(); $schedule->command('sync-recharge-pay-state:weixin')->everyMinute(); $schedule->command('sync-recharge-pay-state:alipay')->everyMinute(); //自动扣款,下午两点开始扣款,每小时可处理3000个子订单,每天可以处理30000个子订单 $schedule->call(function () { (new OrderItems())->autoCheckout(); })->everyMinute()->timezone('Asia/Shanghai')->between('14:00', '23:59'); //自动退款 $schedule->call(function () { (new Refund())->autoRefund(); })->everyMinute(); //自动生成日志文件,配合系统层面定时更新文件权限,避免临时生成后的权限问题 $schedule->call(function () { Log::info('auto generate log file'); })->daily(); } /** * Register the commands for the application. * * @return void */ protected function commands() { $this->load(__DIR__ . '/Commands'); require base_path('routes/console.php'); } }