On Sun, 14 May 2017 22:47:09 +0200 Istvan Gabor <suseuser04@gmail.hu> wrote:
On Sun, 14 May 2017 16:27:31 -0400, Patrick Shanahan wrote:
* Istvan Gabor <suseuser04@gmail.hu> [05-14-17 15:32]:
Hello:
I would like to use cron to start and stop wget commands using wget -q (quiet) and -b (background) options. For stopping the correct wget connect at given time I need to know its pid. wget -bq url runs like this:
wget -b -q -O output-file url-address Continuing in background, pid 10874.
I should somehow record the pid in a file and use it with the kill command, but I don't know how I could do it.
simple if you have only one instance of wget or want to kill all instances: kill -9 `pidof wget`
Thanks Patrick.
I want to run several (at least 2) wgets parallel. If I had only one I could also use 'killall wget'.
I use wget to record live streams that is why I have to start and stop it at given times.
Istvan
Typing 'wget pid' into google shows various possibilities. Why don't you try some and let us know how they work? I could write a perl script but (a) it may not be necessary and (b) why should I? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org