Support Questions

Find answers, ask questions, and share your expertise

How to configure a processor to run only once

avatar
New Contributor
 
6 REPLIES 6

avatar
@HAR MAT

Do you mean once a day, once an hour?

avatar
New Contributor

Hi

Wynner, Thanks for reply

Here is my requirement , I need to transfer between two datasources only once, get the data from the source and keep the data in the target , currently processor is getting executed multiple times based on scheduled duration(for time being I kept very high value to avoid duplicate runs ) . is there a way to configure template instance to run only once in its life time.

avatar

@HAR MAT In that case, you can put the processors, watch it run once and then remove it or disable it.

avatar
Master Mentor

@HAR MAT

You can also use NiFi's rest-api to start and stop processors using a script.

https://nifi.apache.org/docs/nifi-docs/rest-api/

avatar

@HAR MAT

You can use the CRON driven option in the Scheduling strategy to have the flow run once. Or use the rest api to run the processor once.

Here is an example using the cron option, the below processor will run once on May 8th, 2017 at 10AM

15207-screen-shot-2017-05-08-at-114651-am.png

avatar
New Contributor

Screen Shot 2023-09-26 at 10.27.16.png