1

ログファイルをリアルタイムで読み取るスクリプトを作成しました。私が抱えている問題は、そのログファイルの場所が毎晩、同じファイル名の異なるフォルダーで変わることです。

ファイルの場所のパスを再生成できますが、スクリプトを開始/停止してログ ファイルを再処理する方法がわかりません。今は手作業でやっています。

4

1 に答える 1

0

私の提案は

(a) If it's a linux box, why not run a "cron" job (which will stop and start the script)
(b) Alternatively, in your code, detect when the file can no longer be read, then switch folders
于 2012-09-04T15:07:18.673 に答える