# Automating a task daily

**URL:** <https://forum.knime.com/t/automating-a-task-daily/40401>\
**Category:** KNIME Analytics Platform\
**Created:** [March 4, 2022, 10:03am UTC](https://forum.knime.com/t/automating-a-task-daily/40401 "2022-03-04T10:03:14Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joyampo](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/j/ed655f/32.png) [@Joyampo](https://forum.knime.com/u/Joyampo)\
**Post date:** [March 4, 2022, 10:03am UTC](https://forum.knime.com/t/automating-a-task-daily/40401/1 "2022-03-04T10:03:15Z")

</div>

Good morning to all. This is my first post after several years of using Knime (in a very basic way).  
I have searched and have not found anything simple for an automation of a task.  
Basically I have a database connected to a “postgresql conenctor” node, I execute a query with the “database reader” node and the result is saved in an excel file. I would like this to be done automatically every day without having to run it. Is it possible with some node?  
Thank you.

---

<div class="post-metadata">

**Author:** ![takbb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/takbb/32/57077_2.png) [@takbb](https://forum.knime.com/u/takbb)\
**Post date:** [March 4, 2022, 10:36am UTC](https://forum.knime.com/t/automating-a-task-daily/40401/2 "2022-03-04T10:36:49Z")

</div>

Hi @Joyampo and welcome to the community.

There isn’t a scheduler facility built into the free KNIME AP software, as this facility is provided in the licensed KNIME Server product, but please see the following post that covers this subject well and gives you the options available

> [@how to schedule workflow on KNIME Analytics Platform](https://forum.knime.com/t/how-to-schedule-workflow-on-knime-analytics-platform/37041/2):
>
> Hi @aiham30 and welcome to the Knime Community. There are mainly 2 options to do this. Via a Knime Server If you don’t have a Knime server, you can run the workflow via command line, so you can add it to your system’s scheduler (Windows scheduler for Windows, Cron for UNIX/Linux or MacOS) Here are some documentations on how to run a workflow via the command line:

---

<div class="post-metadata">

**Author:** ![SamirAbida](https://forum-cdn.knime.com/user_avatar/forum.knime.com/samirabida/32/28904_2.png) [@SamirAbida](https://forum.knime.com/u/SamirAbida)\
**Post date:** [March 4, 2022, 11:13am UTC](https://forum.knime.com/t/automating-a-task-daily/40401/3 "2022-03-04T11:13:12Z")

</div>

Hello @Joyampo,

There is no node to do that. As @takbb, the better solution should be to use Knime Server.

In the other hand, you can create a batch and schedule it.

> [@Execute Workflow in Batch Mode Windows 10](https://forum.knime.com/t/execute-workflow-in-batch-mode-windows-10/13986/22):
>
> Hello @hdonga, I don’t know if you still have the error or the need to correct this issue, but i was struggling and find out a solution : use of --launcher.suppressErrors put the workflow directory path before “-application org.knime.product.KNIME\_BATCH\_APPLICATION” use of slashes for the workflow directory instead of backslashes "C:\Program Files\KNIME\knime.exe" -nosave -consoleLog -noexit -nosplash -reset -workflowDir="C:/Users\<username\>/knime-workspace/Test" --launcher.suppressErrors -ap…

BR,

Samir

---

<div class="post-metadata">

**Author:** ![Joyampo](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/j/ed655f/32.png) [@Joyampo](https://forum.knime.com/u/Joyampo)\
**Post date:** [March 4, 2022, 11:16am UTC](https://forum.knime.com/t/automating-a-task-daily/40401/4 "2022-03-04T11:16:33Z")

</div>

Muchas gracias por la pronta respuesta. Había leído esa publicación por encima y como no dispongo de grandes conocimientos técnicos había desestimado su realización. Sabiendo que no existe otra opción intentaré ponerla en práctica. Pensé que habría un nodo que dijera “repite esto cada x días”. Mil gracias de nuevo.

---

<div class="post-metadata">

**Author:** ![takbb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/takbb/32/57077_2.png) [@takbb](https://forum.knime.com/u/takbb)\
**Post date:** [March 4, 2022, 12:15pm UTC](https://forum.knime.com/t/automating-a-task-daily/40401/5 "2022-03-04T12:15:30Z")

</div>

Hola @Joyampo  
De nada. Espero que logres lograr lo que deseas, pero haz más preguntas si tienes problemas y estoy seguro de que alguien intentará ayudarte.

You’re welcome. I hope you manage to achieve what you want, but ask more questions if you have problems and I’m sure someone will try to help you

---

<div class="post-metadata">

**Author:** ![aworker](https://forum-cdn.knime.com/user_avatar/forum.knime.com/aworker/32/36421_2.png) [@aworker](https://forum.knime.com/u/aworker)\
**Post date:** [March 4, 2022, 12:24pm UTC](https://forum.knime.com/t/automating-a-task-daily/40401/6 "2022-03-04T12:24:37Z")

</div>

> [@Joyampo](#):
>
> Thank you very much for the quick answer. I had read that publication over and since I do not have great technical knowledge, I had rejected its realization. Knowing that there is no other option, I will try to put it into practice. I thought there would be a node that said “repeat this every x days”. Many thanks again.

Hi @Joyampo & welcome to the KNIME community

You could do it this way but it would be quite inefficient because it would oblige to have KNIME permanently opened on you computer whereas the solution @takbb & @SamirAbida are suggesting are optimized and only run KNIME as a background task at the required scheduled times. This is why it is better to use a crone batch job or a KNIME server to automatically lunch processes at scheduled times.

Hope it helps.

Best

Ael

---

<div class="post-metadata">

**Author:** ![Joyampo](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/j/ed655f/32.png) [@Joyampo](https://forum.knime.com/u/Joyampo)\
**Post date:** [March 6, 2022, 6:27pm UTC](https://forum.knime.com/t/automating-a-task-daily/40401/7 "2022-03-06T18:27:39Z")

</div>

Gracias por la recomendación, pero esa solución se me escapa por falta de conocimientos (lo he intentado y solamente consigo deprimirme). Me dices que también es posible hacerlo, aunque de manera ineficiente, mediante nodos. ¿Me puedes decir cómo?. “Solamente” quiero que un flujo se repita diariamente a una hora.  
Mil gracias

---

<div class="post-metadata">

**Author:** ![SamirAbida](https://forum-cdn.knime.com/user_avatar/forum.knime.com/samirabida/32/28904_2.png) [@SamirAbida](https://forum.knime.com/u/SamirAbida)\
**Post date:** [March 7, 2022, 7:44am UTC](https://forum.knime.com/t/automating-a-task-daily/40401/8 "2022-03-07T07:44:29Z")

</div>

Hi @Joyampo,

It is not really that complicated.  
You just have to save this piece of code in a txt file : (don’t forget to change the paths)

```auto
"C:\Program Files\KNIME\knime.exe" -nosave -consoleLog -noexit -nosplash -reset -workflowDir="C:/Users<username>/knime-workspace/Test" --launcher.suppressErrors -application org.knime.product.KNIME_BATCH_APPLICATION

```

Then change the extension of the .txt file to .bat.

Finally, schedule the launch of the script by following this grreat tutorial (with steps screenshots)  
[How to Schedule a Batch File in Windows (helpdeskgeek.com)](https://helpdeskgeek.com/windows-10/how-to-schedule-a-batch-file-in-windows/)

Good luck =)

Br,  
Samir

---

<div class="post-metadata">

**Author:** ![aworker](https://forum-cdn.knime.com/user_avatar/forum.knime.com/aworker/32/36421_2.png) [@aworker](https://forum.knime.com/u/aworker)\
**Post date:** [March 7, 2022, 11:33am UTC](https://forum.knime.com/t/automating-a-task-daily/40401/9 "2022-03-07T11:33:19Z")

</div>

Hi @Joyampo

Complementary to @SamirAbida batch solution, please find below a solution purely based on KNIME:

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/9/6/96293f2fede608ff50f2a39ce0fee9cc293d7913.png)

[20220307 Pikairos Automating a task daily.knwf](https://forum.knime.com/uploads/short-url/PPQo7VY0cBrx0rpHGaJTdeHYgP.knwf) (426.4 KB)

So far, the task in this workflow is scheduled to run every second. Since the task is just to show the Date & Time, this is just an example so far of how to implement a nice digital watch on KNIME 😉

But as explained on the workflow, you can customize it by replacing the -Your Scheduled Task- component by any task you would need to achieve at regular intervals of time.

The workflow is step by step self-commented on the nodes but please get in touch if you need any further help or explanations.

Hope it helps.

Best

Ael

* * *

Hola @Joyampo

Como complemento a la solución por batch de @SamirAbida, a continuación encontrarás una solución puramente basada en KNIME:

Hasta ahora, la tarea de este flujo de trabajo está programada para ejecutarse cada segundo. Dado que la tarea es solo mostrar la fecha y la hora, este es solo un ejemplo de cómo implementar un buen reloj digital en KNIME 😉

Pero como se explica en el flujo de trabajo, puedes personalizarlo reemplazando el componente -Su tarea programada- por cualquier tarea que necesites realizar a intervalos regulares de tiempo.

El flujo de trabajo esta comentado paso a paso en los nodos, pero no dudes en contactarnos si necesitas más ayuda o explicaciones.

Espero que sea de ayuda.

Saludos

Ael

---

<div class="post-metadata">

**Author:** ![SamirAbida](https://forum-cdn.knime.com/user_avatar/forum.knime.com/samirabida/32/28904_2.png) [@SamirAbida](https://forum.knime.com/u/SamirAbida)\
**Post date:** [March 7, 2022, 12:52pm UTC](https://forum.knime.com/t/automating-a-task-daily/40401/10 "2022-03-07T12:52:15Z")

</div>

@aworker,

You always make wonderful / creative things from nothing (with @bruno29a & @takbb). I’m so jealous 😃 .

But as per my understanding Knime as to be always open for this WF to work, right ?  
Epaté !

BR,  
Samir

---

<div class="post-metadata">

**Author:** ![aworker](https://forum-cdn.knime.com/user_avatar/forum.knime.com/aworker/32/36421_2.png) [@aworker](https://forum.knime.com/u/aworker)\
**Post date:** [March 7, 2022, 1:05pm UTC](https://forum.knime.com/t/automating-a-task-daily/40401/11 "2022-03-07T13:05:13Z")

</div>

> [@SamirAbida](#):
>
> But as per my understanding Knime as to be always open for this WF to work, right ?

Yes indeed, this is why I told @Joyampo that it is better to go for your solution or @takbb’s one 😉

* * *

> [@SamirAbida](#):
>
> You always make wonderful / creative things from nothing (with @bruno29a & @takbb). I’m so jealous 😃 .

Haha ha Samir, tu m’as fait pleurer de rire 🤣 !

Merci beaucoup pour tes compliments et à mon tour, je dois dire que tu m’épates aussi avec tes workflows ! De même que les solutions de @bruno29a et @takbb !

Par ailleurs, il me semble que tu es basé aussi à Toulouse. N’hésite pas à rentrer en contact par email si tu veux. Au plaisir !

Bonne journée !

---

<div class="post-metadata">

**Author:** ![SamirAbida](https://forum-cdn.knime.com/user_avatar/forum.knime.com/samirabida/32/28904_2.png) [@SamirAbida](https://forum.knime.com/u/SamirAbida)\
**Post date:** [March 7, 2022, 1:07pm UTC](https://forum.knime.com/t/automating-a-task-daily/40401/12 "2022-03-07T13:07:05Z")

</div>

@aworker,

Tu n’es pas à Toulouse également si ?  
Mais j’ai cru comprendre qu’avec Bruno, nous étions tous français. Surtout que depuis j’avais vu peu de FR, par ici.

Carrément, il faudra qu’on prenne contact, je note tout ça =).

Samir

---

<div class="post-metadata">

**Author:** ![aworker](https://forum-cdn.knime.com/user_avatar/forum.knime.com/aworker/32/36421_2.png) [@aworker](https://forum.knime.com/u/aworker)\
**Post date:** [March 7, 2022, 1:08pm UTC](https://forum.knime.com/t/automating-a-task-daily/40401/13 "2022-03-07T13:08:32Z")

</div>

Oui,oui, je suis à Toulouse. N’hésite pas à m’envoyer un email pour rentrer en contact.  
Il me semble que @bruno29a est à Manchester lol 🤣  
A bientôt !

---

<div class="post-metadata">

**Author:** ![bruno29a](https://forum-cdn.knime.com/user_avatar/forum.knime.com/bruno29a/32/28802_2.png) [@bruno29a](https://forum.knime.com/u/bruno29a)\
**Post date:** [March 7, 2022, 1:33pm UTC](https://forum.knime.com/t/automating-a-task-daily/40401/14 "2022-03-07T13:33:53Z")

</div>

Bonjour @SamirAbida , @aworker , je n’ai jamais mis les pieds à Manchester 😃

Je suis basé à Montréal, mais je viens de l’île Maurice 😉 Donc, je ne suis pas français non plus 🙂

Je vous réciproque les compliments. Toujours un plaisir de voir vos réponses et workflows

---

<div class="post-metadata">

**Author:** ![SamirAbida](https://forum-cdn.knime.com/user_avatar/forum.knime.com/samirabida/32/28904_2.png) [@SamirAbida](https://forum.knime.com/u/SamirAbida)\
**Post date:** [March 7, 2022, 1:36pm UTC](https://forum.knime.com/t/automating-a-task-daily/40401/15 "2022-03-07T13:36:48Z")

</div>

@bruno29a,

Je me disais bien @aworker. Ok, en tt cas, ouais toujours plaisir de voir vos commentaires !  
Bon aller j’arrête, je pollue ce fil, désolé =)

Samir

---

<div class="post-metadata">

**Author:** ![aworker](https://forum-cdn.knime.com/user_avatar/forum.knime.com/aworker/32/36421_2.png) [@aworker](https://forum.knime.com/u/aworker)\
**Post date:** [March 7, 2022, 1:39pm UTC](https://forum.knime.com/t/automating-a-task-daily/40401/16 "2022-03-07T13:39:00Z")

</div>

Hahaha, maintenant je comprends pourquoi tu (@bruno29a) réponds dès fois à 3 heures du matin d’ici lol !!! J’arrête aussi de polluer ce thread lol 🤣

Sorry @Joyampo for polluting your thread. Hope one of the solutions we posted could solve your problem 😉  
Otherwise, please get in touch and we will all be happy to further help.

Best Ael

---

<div class="post-metadata">

**Author:** ![Joyampo](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/j/ed655f/32.png) [@Joyampo](https://forum.knime.com/u/Joyampo)\
**Post date:** [March 8, 2022, 9:11am UTC](https://forum.knime.com/t/automating-a-task-daily/40401/17 "2022-03-08T09:11:42Z")

</div>

Buenos días a todos.  
Estoy intentando comprender e implementar las dos soluciones propuestas. Pero como eso me lleva tiempo no quiero esperar más para dar las gracias por vuestra colaboración y buen ambiente. Sinceramente me sorprende encontrar personas tan colaboradoras y dispuestas.  
Como no creo que me salga todo a la primera os seguiré preguntando.  
Un cordial saludo

---

<div class="post-metadata">

**Author:** ![aworker](https://forum-cdn.knime.com/user_avatar/forum.knime.com/aworker/32/36421_2.png) [@aworker](https://forum.knime.com/u/aworker)\
**Post date:** [March 8, 2022, 9:35am UTC](https://forum.knime.com/t/automating-a-task-daily/40401/18 "2022-03-08T09:35:37Z")

</div>

Buenos días @Joyampo

Muchas gracias por tu mensaje. Pienso que mensajes de agradecimiento como el tuyo es nuestra mejor recompensa. KNIME es una comunidad encantadora y te confirmo que la ayuda y el ambiente de KNIME es fenomenal.

Espero que tengas suerte en tu implementación de las soluciones propuestas y no dudes en volver a solicitarnos si necesario.

Suerte y un cordial saludo,

Ael

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [June 6, 2022, 9:36am UTC](https://forum.knime.com/t/automating-a-task-daily/40401/19 "2022-06-06T09:36:17Z")

</div>

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