I'm tearing out my hair trying to figure out this mystery.
I've googlefu'd the heck out of this and no resolve. The biggest problem is I can't seem to look under the hood to see what's going on. The knime.log doesn't seem to update when I run in batch mode... anyway let me start with the specifics.
I set up an automated task to run every night at midnight through Windows Task Scheduler. I have it set to run at the highest priveledges. I've done testing either by having it run Knime directly as the program, or through a bat file, and even tried through a "cmd.exe /c mybat.bat" type command (which supposedly perserves the environment by waiting for the task to finish before finishing).
It's important to note that the .bat file works FINE without Task Scheduler.
Here's what I'm telling Knime to do:
"C:\Program Files\KNIME\knime" -nosplash -reset -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir="C:\Users\Administrator\Documents\knime\nightly"
Crazy thing is that the task actually executes sucessfully. I've watched a dozen times in Task Manager as it allocates memory and spins the CPU's. But here's where things get funky. When I run the *.bat file manually, the RAM use will approach 1.5gb, and the CPU will go nuts once and awhile. WHen I run it through Task Scheduler, the RAM will approach 0.5gb, the CPU basically stays asleep... and then!!! once it hits 500,000k it'll start slowly, almost 1k at a time, decreasing. Leave it on for an hour and it'll be at 5,000k just idling, not quiting. What the heck is KNIME doing?
Like I said, I checked the knime.log's and it doesn't even record anything at all. If anyone can clue me in, you'd be my hero.
Try to pass the location of a workspace with -data and then you will find the logs files in this directory. Otherwise it uses the default workspace in the current user's home directory (probably the administrator's in your case).
I'll do this, but the problem is not that I don't know where the logs are, the logs update fine when I run the workflow within Knime. They dont' update when I run it from batch mode, so I don't even know what it's doing.
if I throw -consoleLog on it, then it shows a nice text processing window which lets me know what's going on. However, Task Scheduler must suppress this because it doesn't load this window when running through the scheduler.
It's so frustrating because I know it's loading Knime, and Knime is doing SOMETHING, but then... dies a slow death before it can amount to anything.
I suspect the 500k of ram is Knime loading up all it's libraries and dependencies, and then once it gets to actually running the workflow, it says "Meh, I don't feel like it".. but instead of just quitting, the memory leaks out of it very, very slowly until it sits at 5k ram FOREVER (never quitting).
It's so strange.
Just added it, nothing changed
If the log files in the location you are looking at are not updated than you are looking at the wrong log location. KNIME *will* write a lot of messages from the very beginning even in batch mode. If you pass an non-existing workspace with -data to your call this folder must be created and contain log files. If this is not the case than KNIME doesn't even start properly.
I tried to run KNIME in batch mode with windows task scheduler.
It seems to work (partially) with 1 issue.
It only works if the workflow is resetted so I have to go to the workflow and reset it manually upfront each time.
I am running a bat file with this syntax
“C:\Program Files\KNIME\knime.exe” -consoleLog -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir=“C:\Users\danie\knime-workspace\batchtest\Batchmodetesting”
Edit: If I want to run a workflow in a directory with more workflows, then how do I reference the workflow. In the command above I only reference a directory so I only have one workflow inside.
Any ideas here? Thanks
(There are some posts about this topic so I did not open a new one)