how to auto terminate libreoffice process after pdf conversion

Hi,
I’m facing an issue with my application that whenever “soffice” is called, it remains in the task manager open, please advise, the bat file that I use is the below:

image description

and the errors happens to the server is the below:

image description

Task manager after sometime becomes like:

Please advise how can I make the process self-terminating after work is completed
Thanks in advance