我已经在app/console/kernel.php中的调度程序中添加了一个任务。如下所示:
$schedule->command('atomaton:socket_start --port=8080')
->withoutOverlapping()
->appendOutputTo(base_path().'/atomaton/storage/atnSocket.log');因此,我的问题是:如何确定该命令是否正在运行?能给我PID吗?
发布于 2015-12-24 13:35:17
我发现当你调用withoutOverlapping()时,laravel会在storage/framework/中创建一个文件,就像schedule-xxxxx一样,可以在php artisan schedule:run中检测到,以避免任务重叠。
在Laravel 5.0上进行了测试。
https://stackoverflow.com/questions/34444008
复制相似问题