Browse Source

自动开始活动模式脚本2

master
wanghongjun 4 weeks ago
parent
commit
adc83ef9d9
  1. 9
      app/Console/Kernel.php

9
app/Console/Kernel.php

@ -12,7 +12,9 @@ class Kernel extends ConsoleKernel
*/
protected function schedule(Schedule $schedule): void
{
// $schedule->command('inspire')->hourly();
$schedule->command('run:automatically-start-activity')
->everyMinute() // 或者使用其他频率,如 hourly(), everyFiveMinutes() 等
->timezone('Asia/Shanghai'); // 设置时区,根据需要选择时区
}
/**
@ -24,4 +26,9 @@ class Kernel extends ConsoleKernel
require base_path('routes/console.php');
}
protected $commands = [
Commands\AutomaticallyStartActivity::class,
];
}

Loading…
Cancel
Save