I have a process that I would like to identify, kill, and restart on a timed basis with a CRON job. I need to identify it where the executable string starts with "java" and contains "8091".
Once I identify the process, I want to run a kill -9 [that id]
And then I want to rerun the process by executing the identified executable string.
I am really stuck on the first piece of identification and then setting those two things as variables to use later in my process for the kill and for the restart. Could anyone give me a nudge on how to best accomplish this?
Thanks in advance.