command('run:automatically-start-activity') ->everyMinute() // 或者使用其他频率,如 hourly(), everyFiveMinutes() 等 ->timezone('Asia/Shanghai'); // 设置时区,根据需要选择时区 } /** * Register the commands for the application. */ protected function commands(): void { $this->load(__DIR__.'/Commands'); require base_path('routes/console.php'); } protected $commands = [ Commands\AutomaticallyStartActivity::class, ]; }