我正和Laravel一起运行CRON JOB。
我安排如下。 $ schedule->命令('remind:planner_notif') - > cron('* * * * *') - > withoutOverlapping();
但是我想像while循环一样永远地运行它。
答案 0 :(得分:1)
你可以这样做:
$schedule->command('remind:planner_notif')->everyMinute()->withoutOverlapping();
或例如每日:
$schedule->command('remind:planner_notif')->daily()->withoutOverlapping()
并确保在你的hositng中运行:
* * * * * php /path-to-your-project/artisan schedule:run >> /dev/null 2>&1
答案 1 :(得分:0)
您必须在正在执行的命令中执行此操作。调度程序的工作是运行命令,仅此而已。因此,在命令remind:planner_notif