automatic execution after opening a workflow

Hi community,

I got a question regarding an automatic execution of my workflow after I open it. I do try to open the worflow as a batch run. That works totally fine and opens knime with the needed workflow. But instead of resetting the workflow and automatically execute it, knime opens the workflow only in a second tab and displays me first the tab “Welcome to KNIME Analytics Platform”. After I close that tab, Knime loads the needed workflow but doesn’t execute it.

Can someone help me with that? Thanks in advance!

Does the batch run work when the workflow is resetted first? For me batch works but only if I reset the workflow, which is not really feasible

1 Like

Not really. The batch run opens Knime though, but doesn´t start the workflow automatically. Only opens it in a side tab an in the main tab this “Welcome to KNIME Analytics Platform”.

If it helps, you can disable the “Welcome” screen like this:

However, generally, I’m not sure if this approach to “batch run” is right. Normally you shouldn’t see any GUI at all when running a workflow via the batch application.

1 Like

Hey @qqilihq , Yeah, I was a bit confused about this point, doing a “batch run” and ending up in the UI, I am not sure I understand either.

@PatrickP_MTU , can you explain how you are doing this “batch run”, just in case it is not what we think it is? We usually understand that it means executing a workflow via the command line, and this should not open the GUI

1 Like

if you have ideas why the workflow needs to be manually resetted first and does not work if remains in executed state as batch run then please add that in your answers as well

Hi community. thanks for your replies so far!
Well, I do open the batch run via a command line like this: “[…]lprogs\Knime-AP_E0410\start.bat” -consoleLog -noexit -nosplash -nosave -reset -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir="[…]\Knime\MySQL_Connector"

and it always opens the GUI…

Hi @PatrickP_MTU , can you show us what’s in the start.bat?

the start.bat just has the information which application to run:

@echo off

rem ###TIMESTAMP###

rem ------ insert here the Program you want to start------
rem ------ zu starttendes Programm einfügen --------------
set App=knime.exe

rem ############### do not modify the next command ############
rem ############### den nächsten Befehl bitte nicht verändern #
set ReleasePath=W:\Knime-AP_E0410\Release1

start %ReleasePath%%App% %1

It´s becaus it runs (at our company) as a network application which is not installaed on my computer.

Hi @PatrickP_MTU , thanks for the content of the start.bat. Here’s your issue:
start %ReleasePath%%App% %1

The %1 means the first parameter, and parameters are delimited by space, so in this case, you are only passing “-consoleLog” to your command. So you’re not telling it to run as batch basically.

Change the %1 to %* and you should be good, like this:
start %ReleasePath%%App% %*

1 Like

Hi @bruno29a thanks for your answer. Unfortounatly I can´t change the start.bat because I would need admin rights. But now I know how I could solve the problem. So do I understand right, that if I change %1 to %* the batch run should start without opening the GUI?! That way the workflow would also reset and execute automatically?

Hi @PatrickP_MTU , I think this parameter tells it to run in batch mode:
-application org.knime.product.KNIME_BATCH_APPLICATION

But as stated, with the %1, it’s only taking “-consoleLog”, nothing more.

With %*, it will take all the arguments you are passing, such as “-reset”, and yes, it will execute automatically without opening it from the GUI

1 Like

Hey @PatrickP_MTU , just checking if it worked.

If you are still waiting for the start.bat to be modified, in the mean time, you can actually run “W:\Knime-AP_E0410\Release1knime.exe” instead of the start.bat.

For example:
W:\Knime-AP_E0410\Release1knime.exe -consoleLog -noexit -nosplash -nosave -reset -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir="[…]\Knime\MySQL_Connector"

The start.bat is just a wrapper pointing to the proper location of your Knime executable, but currently is failing to pass all arguments properly (%1 vs %*), so you can still call the Knime executable directly since you know where it is from what the start.bat’s code

1 Like

Hey @bruno29a that was just one great hint! It works absolutly fine now. Such an easy solution. I didn´t notice, that the start.bat shows me the proper location of the knime executable.
Thanks a lot again!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.