I start a script via cron which works fine. But when i then try to end that script via cron (either killall
/ pkill
/ pgrep
does work) nothing happens.
If i let cron try to kill it or try it my own doesn't do a difference.
The only way to stop it seems to be htop
and then F9 (sigterm).
So, How to end a cron-started script?
My scripts starts with #!bin/bash
and cron starts it by ./path/script.sh
.
Any ideas ?
pkill -term
?pkill
:pkill -kill
,pkill -term
, etc.ps -ef
, look for the scriptname, then:kill <pid>