Support Questions
Find answers, ask questions, and share your expertise

NiFi Cron daily Schedule for started workflow runs once

Explorer

I have an ExecuteProcess scheduled via cron using the entry '0 0 11 * * ? *' so it can run daily at 11AM, however cron is not firing for the daily run for the days after the first successful run after starting the workflow. NOTE: The workflow has been left running without any other changes.

Appreciate any advice on how to get past this.

14 REPLIES 14

Re: NiFi Cron daily Schedule for started workflow runs once

Rising Star

Is there anything in the logs? Is it possible it is executing and failing?

Re: NiFi Cron daily Schedule for started workflow runs once

Explorer

I only see INFO entries. I am using the default settings so it may be turned down to INFO.

Re: NiFi Cron daily Schedule for started workflow runs once

Rising Star

I would change the frequency that the cron job executes to troubleshoot, and see if it generating an error. What processor is it that you are running?

Re: NiFi Cron daily Schedule for started workflow runs once

Explorer

I tried running every 5 mts and it seems to fire correctly. I am using the ExecuteProcess processor to run a python script. I read in another post on HCC that once a workflow starts, there has to be another trigger into ExecuteProcess for this to work periodically, else only a workflow restart will enable it. Is that correct?

Re: NiFi Cron daily Schedule for started workflow runs once

Contributor

Another trigger should not be needed. ExecuteProcess effectively behaves as a source processor and should be able to execute as needed. Could you share the post you are referencing?

However, your syntax does look correct for what you are anticipating. I have tested it with other, specific, points in time and it works as anticipated. One thing to remember is that, if you are running NiFi on another server, it uses that time and not the one of your browser creating the configuration.

Re: NiFi Cron daily Schedule for started workflow runs once

Explorer

Here is the link to the post I was referring to - the processor used is different however and probably needs the trigger https://community.hortonworks.com/questions/68683/nifi-scheduling-query.html.

I am running my workflow locally. I am going to retry to run every 24 hours and see if that helps.

Re: NiFi Cron daily Schedule for started workflow runs once

Explorer

one question triggered by what aldrin said - my computer goes to sleep end of the business day and is back on the start of the next business day. Could that be having an impact on the cron? The computer is not shutdown so the nifi process is still running when the computer comes out of sleep.

Re: NiFi Cron daily Schedule for started workflow runs once

Explorer

one clarification - the workstation is out of sleep well before the cron is required to fire.

Re: NiFi Cron daily Schedule for started workflow runs once

Super Guru

I run a chron to execute a script once a day on my Centos server (it cleans up Apache NiFi logs) and it runs fine. But it's a headless server and it's always running and it's CENTOS.

I think it's a Windows issue.

You should try a simple flow and have it run once an hour and have it write the time to a file. Then you'll see when's it running.

You could also do the same thing for every minute if you want to know when it's not running.

Your NIFI clock may be wrong as well, mine defaulted to GMT. Make sure it has your timezone.