I’d like to be able to run a workflow in batch mode. I’ve read the FAQ and see the command is for windows:
knime -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION workflowDir=“workspace/Knime_project”
So I’ve tried running a very simple workflow consisting of creating a table and writing out the table to an xlsx file in my c:\temp directory.
I get an exit error 2 which reading through the community denotes I’m missing some parameters/variables etc. Does anyone have insight on what might be the issue?
Maybe I need to setup knime variables somehow?
Do you get any errors in the console, or in a file called hs_err_pid[some numbers].log in your KNIME installation folder?
Also, you could try adding the options -consolelog and -nosplash and -launcher.suppressErrors immediately after the knime part of the command.
Thanks for response. I could not find the log file on my drive. I added the items on the command line but it still came back with an error Java was started but returned exit code 2.
I will post the very simple workflow process to see if that my provide any ideas.
I was able to write a batch file to write the Excel file to my Desktop.
“C:\Program Files\KNIME\knime.exe” -nosave -consoleLog -noexit -nosplash -reset -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir=“C:\default_workflow_directory_here\forum_batch_test”
Give that a try, replacing your knime.exe location and your workflow directory location.
Thanks for response. Just for clarification, before running as a batch file do I export to a directory a batch_test.knwf or do I refer to it on command line in some special way such as Local://NGProjects/batch_test see attached screen.
I still get the error number 2 in java screen but also an error in cmd window ERROR main BatchExecutor Workflow directory ‘C:\temp\batch_test’ is not a directory.
org.knime.core.node.workflow.BatchExecutor$IllegalOptionException: Workflow directory ‘C:\temp\batch_test’ is not a directory.
I’m trying to understand a basic concept with Knime. See above a picture of knime explorer. I have created a directory within the local workspace called NGprojects. Within it I have created a simple workflow called batch_test in which a table is read and an excel file is written. I think I have figured out how to run a batch process and refer to the above workflow. Can one export a workflow and run a .knwf? I believe I have seen it referred to in community or documentation but not sure if possible.