reset and start execute again

Hello, i wanna reset and execute it again depending with time. I want it to reset itself every 30 minutes and restart. Because after I process the data I pull from the system and export it as an Excel file, I share it via email.

reset and start execute again.knwf (60.3 KB)

@msg90 to do something every X minutes or seconds you can take a look at this

First of all, thank you for your response. I actually checked these, but I couldn’t do it. It waits for 10 seconds, but then it doesn’t start the process.

What I want is exactly this:

The process should start and export the Excel file.
It should wait half an hour, run again, and overwrite the file.
It should do this automatically every half hour.

Does the input file always have the same name and is it the only file in the folder?

My input is a SQL database and same location. However, since the data inside is constantly updated, I want to organize this data and share it with my team automatically. I’ve done everything else, but I couldn’t get it to run automatically every half hour. ( the document just example for me , main doc is different )

windows task scheduler + batch mode

or

open Knime instance with a loop and (easy option) a wait node that waits 30 mins or (more complex) a java snippet that waits til certain epoch

Thank you, can you give me 1 example for that “open Knime instance with a loop and (easy option) a wait node that waits 30 mins”.

I don’t think there is an easy way to rerun a workflow on a fixed schedule without using Knime Server (Business Hub) or a batch file or Knime Pro.

not to complex even with an open knime instance as long as you do not need something included that cancels the current loop after X epochs to run it freshly (in case the loop run takes longer than the re-start window)

otherwise, there are plenty of options how to do it, one easy is an recursive loop that runs without time limit, and checks every X seconds if utcnow() aligns with certain point in time(-list) and if thats the case it runs. add a recalc of the next timestamp(s) (in hh:mm) and a waiter for at least 60 secs to prevent double execution, and voila.

Thank you for answer but i need to see basic example for apply to my working space because i cant apply it with Recursive Loop Start

What have you tried?

Here is a basic example where there is some loop with a wait node nested inside…

If I’m not mistaken, the problem with using a loop is that it will tie up the computer you’re using. You won’t be able to do other work while the loop is executing. If you use a batch file with a separate workspace it won’t interfere with doing other work in KAP.

Yes, it’s sufficient for me if it only works when the computer is on.

Is your input producing new data every 30 minutes 24/7? If so, shutting down your computer will result in missed data. And once again, if you use a timed loop in your workflow you won’t be able to do anything else in Knime. I really don’t understand why you’re so averse to using a batch approach.

Actually I don’t want it running 24/7; it’s sufficient for me if it works when the computer is on.

Do I need to do this to use it for batch ? Save it look like a .bat file and trigger it with task scheduler

“C:\Program Files\KNIME\knime.exe” -reset -nosave -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION -workflowdir=“C:/Users/mfarran/knime-workspace/test”

@msg90 if you are interested in Batch processing I tried to collect the necessary information:

https://medium.com/low-code-for-advanced-data-science/knime-batch-processing-on-windows-and-macos-caacde067bd0

If you want a loop you can use the examples mentioned above. Maybe you can explain what problems your are facing.

Your .bat file looks ok. Make sure to use a different workspace for this workflow so it doesn’t interfere with using KAP on other workflows while the batch file is executing. I don’t think you’ll need a loop in the workflow since the batch file will re-execure as you set it in the Task Scheduler. Here are instructions for setting up the Task Scheduler:

Thank you so much, and thank you for everyone who try to help me