Hi guys, I’ve a need using windows command prompt just to send a alert mnessage when the flow finish. It’s a local machine to process the flow and all examples with external tools neet to pass a file or data.
Hi @denisfi , I believe you’ll need either Java (or I guess Python should be able to do it too) or an extension to run a command file from KNIME.
I used the java approach in that component. I built that back when I first started using KNIME, based on an idea that @qqilihq had posted, as you can see here,
and it will do what you are asking without any other nodes installed, as demonstrated in the workflow example I posted.
There is at least one extension node that can run shell scripts too, which may work for you:
Possibly the “External Tools” node can also work for you
but it still requires you to have the command in a script. Did you try the demo workflow to see if it works for you?
I don’t know of any other “native” ways of executing a command script.
I tried these nodes, but always neet to send data, not a simple command script. For me, it is important to know on frontend that the flow ran and show a message to identify if its ok or error, with the name from this workflow.
I’ll see the post as you gentilly pass before and try it.
Ah, I didn’t realise you were running in batch mode. I haven’t tried using using this in batch mode, and unfortunately the calls made by java here used the java awt “desktop” calls so I can understand why they wouldn’t work when there is no UI. Before I go trying to think of an alternative, can you confirm that the component works when executed within a (non batch) desktop workflow.
Try refreshing (updating ) the component. It now uses a different mechanism. I haven’t tested it in batch, but it should now be able to execute in a batch (headless) environment.
I can’t say for sure that the Windows MSG command will work in that environment though!