PHPでは、
I need to execute background tasks. So I have three choices to run script from
following commands:
1)exec
2)shell_exec
3)passthru
I randomly decided to use exec command in PHP.
Because All of these have similar characteristics.
バックグラウンドで実行されるものはありますdisadvantage of exec() command
か?実際、私はこのコマンドについてあまり認識していません。
メインスレッドとは別スレッドにするのですか?このバックグラウンド スレッドyes then
をクリーンアップまたは一時停止する方法はありますか?it simply forget it after firing the command
私のコードでは必要があるため、これを求めていますrun this script very fast one after one within moments
。それで、それはサーバー負荷を作成しますか?
編集: 私は次のようなexecコマンドを使用しています:
exec("/usr/bin/php /path/to/Notification.php >> /path/to/log_file.log 2>&1 &");
これについて私を案内してください。どんな助けでも大歓迎です。