Extract time each minute

Hi!

I want to build a workflow that updates itself automatically each day at 11:00 am.
I have been reading through the posts referencing batch and task scheduler but I need a simpler way.
For that, my first idea is to extract the Date&Time each minute. I was thinking about the Date&Time Input and Wait nodes, maybe combined with a loop. This should give a 1x1 table with the current time.
Then, whenever the result is “11:00 am”, every node in the workflow should reset and execute itself.

Is this possible?

Best regards,

Jorge

Hi @jorgemartcaam , the simpler way would actually be using the task scheduler and a batch file.

If I understood your idea correctly, I see a few drawbacks such as:

  1. Your workflow would constantly be running, and looping infinitely. I am not sure how efficient this is, not to mention that it would be using resources constantly.
  2. What happens if the workflow is somehow stopped? What would re-trigger the workflow?
  3. It would mean to have Knime open all the time. What if you need to restart Knime? What would re-trigger the workflow?
  4. Based on what you explained, you are expecting the workflow to be reset by the workflow itself. I don’t think that this is possible.

With the task scheduler:

  1. Your workflow does not have to keep running, therefore will only use resources whenever it runs.
  2. You do not have to worry about manually triggering or re-triggering the workflow.
  3. You can restart your Knime independently, and not to worry about manually triggering or re-triggering the workflow.
  4. Each trigger via the command line is a new execution and has the option to reset the workflow before executing.
4 Likes

Thanks for your answer!
Since I was going to leave the office for a week, I did not really care about efficiency, having Knime open or restarting because of updates.
With “simpler” I really meant faster to achieve with my knowledge :sweat_smile:.The main problem for me with this approach was the possibility of stoppage, which indeed would not have been a problem with the task scheduler.
Thank you anyway!

Hello @bruno29a,

As a matter of fact, I’m very interested, too. Do you have any doc. or link on this matter. You’re talking about the “classic task scheduler” in windows, right ?

Many thanks.
Br,
Samir

Hi @SamirAbida , if you are on Windows, yes, it would be the classic Task Scheduler. On other OSes, they have different tools such as Cron for Linux.

1 Like

Hi there,
If it helps, here you have other posts I saw about the same topic.
The faq, where you can see how to deploy it: https://www.knime.com/faq#q12

A couple of posts about the task scheduler and possible problems.

Keep us updated with your progress!

Best regards.

2 Likes

Hello @bruno29a, @jorgemartcaam,

Thanks for your answers, I appreciate it. I’ll check that out 'cause it seems interesting and useful.

Br,
Samir

1 Like

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