Start Workflow via Batch - cmd Process an KNIME will not be terminated if the workflow not comple...

Hello,

i started a workflow using a batch file via the Task Scheduler. If the workflow runs without errors, the cmd process and KNIME will also exit cleanly. However, if the workflow has an error, the cmd process and KNIME continue to run. In the log file that I create in the batch file, I see that the workflow was not completed successfully.

In such a case, how can I still ensure that the cmd process and KNIME are terminated?

Does anyone have a solution or at least an approach to a solution?