How to run workflow in Centos linux command?

Dears,
I need to run a workflow from command line of centos linux, Would you please share the exact command which has worked? im going to set this command on corntab.

BR,
Milad

The command which I have test is:
./knime -nosplash -reset application org.knime.product.KNIME_BATCH_APPLICATION​

where is a location of workflow?

Hi Milad,

As described in the KNIME FAQ #12, you run a workflow in batch mode as follows:

In order to run a workflow, named “Knime_project” contained in the workspace directory, execute in one line:

knime -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir= "workspace/Knime_project"

In order to run a workflow, name “Knime_project.zip” exported as an .zip file, execute in one line:

knime -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION -workflowFile= "PATH_TO_FILE/Knime_project.zip"

Additional information offers the CLI usage/help page:

Usage: The following options are available:
 -nosave           => do not save the workflow after execution has finished
 -reset            => reset workflow prior to execution
 -failonloaderror  => don't execute if there are errors during workflow loading
 -updateLinks      => update metanode links to latest version
 -credential=name[;login[;password]] => for each credential enter credential
                      name and optional login/password, otherwise its prompted for
 -masterkey[=...]  => prompt for master password (used in e.g. database nodes),
                      if provided with argument, use argument instead of prompting
 -preferences=...  => path to the file containing eclipse/knime preferences,
 -workflowFile=... => ZIP file with a ready-to-execute workflow in the root 
                      of the ZIP
 -workflowDir=...  => directory with a ready-to-execute workflow
 -destFile=...     => ZIP file where the executed workflow should be written to
                      if omitted the workflow is only saved in place
 -destDir=...      => directory where the executed workflow is saved to
                      if omitted the workflow is only saved in place
 -workflow.variable=name,value,type => define or overwrite workflow variable
                      'name' with value 'value' (possibly enclosed by quotes). The
                      'type' must be one of "String", "int" or "double".
Some KNIME settings can also be adjusted by Java properties;
they need to be provided as last option in the command line:
 -vmargs -Dorg.knime.core.maxThreads=n => sets the maximum
                  number of threads used by KNIME

The following return codes are defined:
	0	upon successful execution
	2	if parameters are wrong or missing
	3	when an error occurs during loading a workflow
	4	if an error during execution occurred

Best regards,
Daniel

1 Like