I need a script that will murder java processes that have been on for more than one hour.
So I am trying this
timeout -k 10s nohup cpulimit -l 40 -- java -jar file.jar
Any idea why this isn't working?
You should have the
nohup first, then
nohup's disassociation with the controlling terminal breaks the ownership relationship that
timeout uses to kill.
timeout "Ten Seconds", not "One Hour".