built-in service to check if service is running

Is there a built-in service I can invoke to determine if a different service is already actively running on the cluster and/or on the IS ? Before I execute my custom service, I would like to do that check. I don’t want to have multiple instances of my custom service running.

You can use the service wm.server.query:getServiceStats present in WmRoot package and check for the output field “SvcStats/sRunning”.

Note that this service is internal to the product and it should be used at your own risk as service might change without prior notice and there is no docs available (publicly).

To make this service visible in the designer set the property in the IS extended settings and refersh the designer session.

watt.server.ns.hideWmRoot=false

I’d rather use a DB for synchronization. If you use a cluster, the services stats will be of no use (depends on what exactly is your goal). Create a table, insert an entry when the service is started. Check for the entry existence before doing the work.

A file on a commonly used file system (share) would also work perfectly.