How to run multiple workflows in a single batch file

Hi,

I am trying to run multiple worklflows uisng a single batch file. I used the below script and it throws error.

knime.exe" -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir=“workflow 1”, “workflow 2”, workflow 3" -reset -consoleLog -noexit

When I remove the comma in worklfowDir and keep only one workflow name at a time, Run was successful.

So, I would like to know the script for running multiple workflows in a single batch file.

Any help would be appreciated.

Hi Braveen,

I don’t think that you can specify multiple WFs in one go. You can use a loop instead. Or simply copy and paste the command n times.

–Philipp

1 Like

If you could give a syntax, it would be helpful.

I can’t, I’m not a Windows user. Check here: https://stackoverflow.com/a/2591782

1 Like

Remove noexit , this will exit after executing first command… Add the second flow as second command line in the same batch file… This will execute the flow one after another… I am not sure if you want to run them in parallel, in such case, you can call the other flows from within the flow and link them with some variables to make sure both gets executed before the application closes…

I don’t want to close the app after first flow execution. Can you please elaborate the process as in how do I call other flows within in flow using batch cmds?

Hi Braveen,
This might help you…

For the other thing, it is just a batch file… you execute one flow and than the other… Try using the following in the batch file…

knime.exe" -nosplash -reset -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir=“workflow 1”
knime.exe" -nosplash -reset -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir=“workflow 2”
knime.exe" -nosplash -reset -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir=“workflow 3”

I can not see any reason it won`t work…

Thanks for your response, This script is working. But, It is launching the app three times which is exactly what I want to avoid.

Hi Braveen, could you please provide more detail and exact code to execute your Knime workflow via command line ?

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