Knime Batch Mode Error

Hi, I run the batch via command prompt windows it fails and it appears like this

knime -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir=“workspace/data transfer”

Where is the error and what should be changed?

Hi @alvoholic , you need to close the workflow from your Knime AP (Knime UI) in order to run it via the command line. If it’s open, then it’s in use and is locked, and therefore it cannot be run via the command line.

Make sure the workflow you are trying to run is not open or being run.

Also, please do NOT create multiple threads for the same issue. This seems to be same issue as your other thread:

You might also want to add the parameter -reset to your command line if you want the workflow to reset automatically.

1 Like

I have closed the desired workflow but the same error still appears

Hi @alvoholic , thank you for closing the duplicate thread.

I’m sorry to hear that your issue still persists. Can you try using the absolute path for the workflowDir? Like “C:\....

Hi Bruno, I have tried but the result still appears the same error

knime -reset -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir=“C:\Users\User\knime-workspace\KNIME_project6”

Hi @alvoholic I’m sorry to hear that you still have the issue. The only thing I can think of is that it might have to do with your java environment.

Let’s see what a Knime team member suggests.

Try to see whether it works with another workflow or whether it is a general problem

Hi guys finally i can run it via batch mode, thankyou

what’s changed?You might want to share your solution

Hi @alvoholic , happy to hear that it’s resolved. Could you share what the fix was so that other members can learn from it?

I run a script like the following in cmd

“C:\Program Files\KNIME\knime.exe” -nosave -consoleLog -noexit -nosplash -reset -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir=“C:\Users\User\knime-workspace\KNIME_project6”

and when I close the current workflow window it seems like the process is still running so I close the knime application.
fyi, with the script above, two windows will appear when run automatically via Windows Task Scheduler and will not disappear. Windows Task Scheduler cannot run as daily for that job when both windows are not closed. To remove these two windows so that they can run automatically, simply remove “-consoleLog” and “-noexit”. But the risk is that you can’t see the logs when an error occurs due to network or other reasons. Thank you

Thanks for the update @alvoholic

So, the issue was still about the workflow being in use then. It’s weird that you had to close your Knime AP, but it can happen when your system is running slow.

Removing -noexit should be enough for the windows to close. You can keep -consoleLog, it will close automatically, that is if everything went fine.

If there is any issue, you would see a popup and your windows will not close, and you will be able to see what’s from the consoleLog in that case. But if everything ran fine, it will close the windows.

can we save the logs from console log into another file or directory?

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