参考
https://stackoverflow.com/questions/4929827/shell-exec-php-with-nohup
红色部分为关键点。
nohup /usr/bin/php /mytask/task1.php >/mytask/nohup/task1.log 2>&1 &
Powered by: 博客园 Copyright © 2024 coffee Powered by .NET 8.0 on Kubernetes