Can I get currently running Jobs on a particular business host and hold them in a variable
I am working on automating to pick all the jobs running particular business process and kill them by using a routine. Though I was able to kill the jobs/PID on server by using (sudo kill jobid) and by using
Product version: HealthShare 2017.2
$ZV: 70626DDA-3A37-11E5-A37C-5056AB681A00
Why do you want to kill all BH jobs directly?
You can just disable a BH and it would effectively do the same:
set sc = ##class(Ens.Director).EnableConfigItem(BH, 0)
Lebedyuk - We have to disable jobs/PID before disabling the BH as we are querying database. If you are still suggest that disbaling BH without killing jobs will not have any imapct let me know.
FYI- I am invoking above class for enabling and disabling BH.
Disabling BH gracefully shutdowns all BH jobs.