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.
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.
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 )
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.
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.
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.
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: