I have created an MQ Service object to run my Trigger Monitor thus:-
DEFINE SERVICE('TriggerMonitor') +
CONTROL(QMGR) +
STARTCMD('C:\Program Files (x86)\IBM\WebSphere MQ\bin\runmqtm') +
STARTARG('-m TriggerTest -q InitQueue')
Even though I set runmqtmc.exe in "Start Command" property it is showing me "Service Status" as Stopping. Is there way to make this runmqtmc running as a background service on windows without having to run it in a command prompt?
In order to see status of a program running as an MQ Service Object, it must be of type
SERVER
. The default is typeCOMMAND
which allows you to have as many of the program running, but therefore means you can't display status of it. Define the Service Object withSERVTYPE(SERVER)
and thenDISPLAY SVSTATUS
will show status of the running program.Read more about this in Working with Services
Also, another helpful hint looking at your
STARTCMD
value, did you know that you can use a replaceable insert instead of having to provide the full installation path to the program. Read more about this in Replaceable inserts on service definitions