How do I stop a currently running cron job executing wget?
Solution 1:
I think you killed /bin/sh
which was the parent of wget
you were after. You did not do anything to wget
.
To kill wget
with kill
you need to find the PID of wget
. ps fauxww | grep -A 2 '[C]RON'
(or more than 2
) could have shown you the right wget
. Now it may be too late to find wget
this way because as an orphaned process it was adopted by another process which may or may not match [C]RON
.
Find the PID of wget
with pidof wget
or ps … | grep [w]get
, not relying on its relation to CROND
because the relation may be no more. In case of many wget
processes you may need to investigate further to find the right PID among many. Then kill
it.
Expect success, unless you target the wrong process again. Your previous attempt did not kill wget
because you did not target wget
at all.