You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Asanka Sanjaya <an...@gmail.com> on 2018/12/31 07:04:42 UTC
Cron-schedule not working
Hello,
I use a cron-driven processor to start the workflow and the expression is:
0 0 0 * * ?
I expect the processor to run each day at 00:00 hours. But it runs each
hour instead.
Processor configuration:
[image: image.png]
Flow:
[image: image.png]
What could be the possible reasons for this?
--
*Thanks,*
Asanka Sanjaya Herath
Senior Software Engineer | Zone24x7
Re: Cron-schedule not working
Posted by Asanka Sanjaya <an...@gmail.com>.
Hi Josef,
Good suggestion. I will try it out and update the thread.
On Wed, Jan 2, 2019 at 2:40 PM <Jo...@swisscom.com> wrote:
> Hi Asanka
>
>
>
> For a CRON which runs once a day at 7 AM I use this pattern “0 0 7 * * ?”.
> So I don’t see any reason why your CRON doesn’t work. Can you try with an
> example like 1 AM instead of midnight and see what’s happening?
>
>
>
> Cheers Josef
>
>
>
>
>
> *From: *Asanka Sanjaya <an...@gmail.com>
> *Reply-To: *"users@nifi.apache.org" <us...@nifi.apache.org>
> *Date: *Wednesday, 2 January 2019 at 07:01
> *To: *"users@nifi.apache.org" <us...@nifi.apache.org>
> *Subject: *Re: Cron-schedule not working
>
>
>
> Hi All,
>
>
>
> Does anybody else have any idea regarding this?
>
>
>
> On Tue, Jan 1, 2019 at 7:26 PM Chad Woodhead <ch...@gmail.com>
> wrote:
>
> Hi Asanka,
>
>
>
> Yes you are correct, my mistake. NiFi uses the Quartz Cron and not the
> Linux cron.
>
>
>
> Every day at midnight is: 0 0 0 * * ?
>
>
>
> My apologies.
>
>
>
> -Chad
>
>
> On Jan 1, 2019, at 1:55 AM, Asanka Sanjaya <an...@gmail.com> wrote:
>
> Hi Chad,
>
>
>
> The nifi docs say that the expression should start with seconds and not
> with minutes. https://nifi.apache.org/docs/nifi-docs/html/user-guide.html
>
>
>
> [image: image.png]
>
>
>
> This is the example that they have given:
>
> The string 0 0 13 * * ? indicates that you want to schedule the processor
> to run at 1:00 PM every day.
>
>
>
> It seems like nifi cron expressions are quite different.
>
>
>
>
>
> On Tue, Jan 1, 2019 at 11:58 AM Asanka Sanjaya <an...@gmail.com> wrote:
>
> Thanks Chad!
>
>
>
> On Mon, Dec 31, 2018 at 6:22 PM Chad Woodhead <ch...@gmail.com>
> wrote:
>
> Hi Asanka,
>
>
>
> The cron expression for every night at midnight is: 0 0 * * *
>
>
>
> 0 0 0 * * is not a valid cron expression as the 3rd field (day of month)
> cannot be a 0.
>
>
>
> Here is an online cron editor that can help build your cron expressions:
> https://crontab.guru/
>
>
>
> Also here is simple cron tester to see the next n iterations of your cron
> expression: http://cron.schlitt.info/
>
>
>
> -Chad
>
>
>
> On Dec 31, 2018, at 2:04 AM, Asanka Sanjaya <an...@gmail.com> wrote:
>
>
>
> Hello,
>
>
>
> I use a cron-driven processor to start the workflow and the expression is:
>
>
>
> 0 0 0 * * ?
>
>
>
> I expect the processor to run each day at 00:00 hours. But it runs each
> hour instead.
>
>
>
> Processor configuration:
>
> <image.png>
>
>
>
>
>
> Flow:
>
>
>
> <image.png>
>
>
>
> What could be the possible reasons for this?
>
>
>
>
>
> --
>
> *Thanks,*
>
> *Asanka Sanjaya Herath*
>
> *Senior Software Engineer | Zone24x7*
>
>
>
>
>
>
> --
>
> *Thanks,*
>
> *Asanka Sanjaya Herath*
>
> *Senior Software Engineer **|** Zone24x7*
>
>
>
>
> --
>
> *Thanks,*
>
> *Asanka Sanjaya Herath*
>
> *Senior Software Engineer **|** Zone24x7*
>
>
>
>
> --
>
> *Thanks,*
>
> *Asanka Sanjaya Herath*
>
> *Senior Software Engineer **|** Zone24x7*
>
--
*Thanks,*
Asanka Sanjaya Herath
Senior Software Engineer | Zone24x7
Re: Cron-schedule not working
Posted by Jo...@swisscom.com.
Hi Asanka
For a CRON which runs once a day at 7 AM I use this pattern “0 0 7 * * ?”. So I don’t see any reason why your CRON doesn’t work. Can you try with an example like 1 AM instead of midnight and see what’s happening?
Cheers Josef
From: Asanka Sanjaya <an...@gmail.com>
Reply-To: "users@nifi.apache.org" <us...@nifi.apache.org>
Date: Wednesday, 2 January 2019 at 07:01
To: "users@nifi.apache.org" <us...@nifi.apache.org>
Subject: Re: Cron-schedule not working
Hi All,
Does anybody else have any idea regarding this?
On Tue, Jan 1, 2019 at 7:26 PM Chad Woodhead <ch...@gmail.com>> wrote:
Hi Asanka,
Yes you are correct, my mistake. NiFi uses the Quartz Cron and not the Linux cron.
Every day at midnight is: 0 0 0 * * ?
My apologies.
-Chad
On Jan 1, 2019, at 1:55 AM, Asanka Sanjaya <an...@gmail.com>> wrote:
Hi Chad,
The nifi docs say that the expression should start with seconds and not with minutes. https://nifi.apache.org/docs/nifi-docs/html/user-guide.html
[image.png]
This is the example that they have given:
The string 0 0 13 * * ? indicates that you want to schedule the processor to run at 1:00 PM every day.
It seems like nifi cron expressions are quite different.
On Tue, Jan 1, 2019 at 11:58 AM Asanka Sanjaya <an...@gmail.com>> wrote:
Thanks Chad!
On Mon, Dec 31, 2018 at 6:22 PM Chad Woodhead <ch...@gmail.com>> wrote:
Hi Asanka,
The cron expression for every night at midnight is: 0 0 * * *
0 0 0 * * is not a valid cron expression as the 3rd field (day of month) cannot be a 0.
Here is an online cron editor that can help build your cron expressions: https://crontab.guru/
Also here is simple cron tester to see the next n iterations of your cron expression: http://cron.schlitt.info/
-Chad
On Dec 31, 2018, at 2:04 AM, Asanka Sanjaya <an...@gmail.com>> wrote:
Hello,
I use a cron-driven processor to start the workflow and the expression is:
0 0 0 * * ?
I expect the processor to run each day at 00:00 hours. But it runs each hour instead.
Processor configuration:
<image.png>
Flow:
<image.png>
What could be the possible reasons for this?
--
Thanks,
Asanka Sanjaya Herath
Senior Software Engineer | Zone24x7
--
Thanks,
Asanka Sanjaya Herath
Senior Software Engineer | Zone24x7
--
Thanks,
Asanka Sanjaya Herath
Senior Software Engineer | Zone24x7
--
Thanks,
Asanka Sanjaya Herath
Senior Software Engineer | Zone24x7
Re: Cron-schedule not working
Posted by Asanka Sanjaya <an...@gmail.com>.
Hi All,
Does anybody else have any idea regarding this?
On Tue, Jan 1, 2019 at 7:26 PM Chad Woodhead <ch...@gmail.com> wrote:
> Hi Asanka,
>
> Yes you are correct, my mistake. NiFi uses the Quartz Cron and not the
> Linux cron.
>
> Every day at midnight is: 0 0 0 * * ?
>
> My apologies.
>
> -Chad
>
> On Jan 1, 2019, at 1:55 AM, Asanka Sanjaya <an...@gmail.com> wrote:
>
> Hi Chad,
>
> The nifi docs say that the expression should start with seconds and not
> with minutes. https://nifi.apache.org/docs/nifi-docs/html/user-guide.html
>
> [image: image.png]
>
> This is the example that they have given:
> The string 0 0 13 * * ? indicates that you want to schedule the processor
> to run at 1:00 PM every day.
>
> It seems like nifi cron expressions are quite different.
>
>
> On Tue, Jan 1, 2019 at 11:58 AM Asanka Sanjaya <an...@gmail.com> wrote:
>
>> Thanks Chad!
>>
>> On Mon, Dec 31, 2018 at 6:22 PM Chad Woodhead <ch...@gmail.com>
>> wrote:
>>
>>> Hi Asanka,
>>>
>>> The cron expression for every night at midnight is: 0 0 * * *
>>>
>>> 0 0 0 * * is not a valid cron expression as the 3rd field (day of month)
>>> cannot be a 0.
>>>
>>> Here is an online cron editor that can help build your cron expressions:
>>> https://crontab.guru/
>>>
>>> Also here is simple cron tester to see the next n iterations of your
>>> cron expression: http://cron.schlitt.info/
>>>
>>> -Chad
>>>
>>> On Dec 31, 2018, at 2:04 AM, Asanka Sanjaya <an...@gmail.com> wrote:
>>>
>>> Hello,
>>>
>>> I use a cron-driven processor to start the workflow and the expression
>>> is:
>>>
>>> 0 0 0 * * ?
>>>
>>> I expect the processor to run each day at 00:00 hours. But it runs each
>>> hour instead.
>>>
>>> Processor configuration:
>>> <image.png>
>>>
>>>
>>> Flow:
>>>
>>> <image.png>
>>>
>>> What could be the possible reasons for this?
>>>
>>>
>>> --
>>>
>>> *Thanks,*
>>> Asanka Sanjaya Herath
>>> Senior Software Engineer | Zone24x7
>>>
>>>
>>>
>>
>> --
>>
>> *Thanks,*
>>
>> Asanka Sanjaya Herath
>>
>> Senior Software Engineer | Zone24x7
>>
>
>
> --
>
> *Thanks,*
>
> Asanka Sanjaya Herath
>
> Senior Software Engineer | Zone24x7
>
>
--
*Thanks,*
Asanka Sanjaya Herath
Senior Software Engineer | Zone24x7
Re: Cron-schedule not working
Posted by Chad Woodhead <ch...@gmail.com>.
Hi Asanka,
Yes you are correct, my mistake. NiFi uses the Quartz Cron and not the Linux cron.
Every day at midnight is: 0 0 0 * * ?
My apologies.
-Chad
> On Jan 1, 2019, at 1:55 AM, Asanka Sanjaya <an...@gmail.com> wrote:
>
> Hi Chad,
>
> The nifi docs say that the expression should start with seconds and not with minutes. https://nifi.apache.org/docs/nifi-docs/html/user-guide.html
>
>
>
> This is the example that they have given:
> The string 0 0 13 * * ? indicates that you want to schedule the processor to run at 1:00 PM every day.
>
> It seems like nifi cron expressions are quite different.
>
>
>> On Tue, Jan 1, 2019 at 11:58 AM Asanka Sanjaya <an...@gmail.com> wrote:
>> Thanks Chad!
>>
>>> On Mon, Dec 31, 2018 at 6:22 PM Chad Woodhead <ch...@gmail.com> wrote:
>>> Hi Asanka,
>>>
>>> The cron expression for every night at midnight is: 0 0 * * *
>>>
>>> 0 0 0 * * is not a valid cron expression as the 3rd field (day of month) cannot be a 0.
>>>
>>> Here is an online cron editor that can help build your cron expressions: https://crontab.guru/
>>>
>>> Also here is simple cron tester to see the next n iterations of your cron expression: http://cron.schlitt.info/
>>>
>>> -Chad
>>>
>>>> On Dec 31, 2018, at 2:04 AM, Asanka Sanjaya <an...@gmail.com> wrote:
>>>>
>>>> Hello,
>>>>
>>>> I use a cron-driven processor to start the workflow and the expression is:
>>>>
>>>> 0 0 0 * * ?
>>>>
>>>> I expect the processor to run each day at 00:00 hours. But it runs each hour instead.
>>>>
>>>> Processor configuration:
>>>> <image.png>
>>>>
>>>>
>>>> Flow:
>>>>
>>>> <image.png>
>>>>
>>>> What could be the possible reasons for this?
>>>>
>>>>
>>>> --
>>>> Thanks,
>>>> Asanka Sanjaya Herath
>>>> Senior Software Engineer | Zone24x7
>>>
>>
>>
>> --
>> Thanks,
>> Asanka Sanjaya Herath
>> Senior Software Engineer | Zone24x7
>
>
> --
> Thanks,
> Asanka Sanjaya Herath
> Senior Software Engineer | Zone24x7
Re: Cron-schedule not working
Posted by Asanka Sanjaya <an...@gmail.com>.
Hi Chad,
The nifi docs say that the expression should start with seconds and not
with minutes. https://nifi.apache.org/docs/nifi-docs/html/user-guide.html
[image: image.png]
This is the example that they have given:
The string 0 0 13 * * ? indicates that you want to schedule the processor
to run at 1:00 PM every day.
It seems like nifi cron expressions are quite different.
On Tue, Jan 1, 2019 at 11:58 AM Asanka Sanjaya <an...@gmail.com> wrote:
> Thanks Chad!
>
> On Mon, Dec 31, 2018 at 6:22 PM Chad Woodhead <ch...@gmail.com>
> wrote:
>
>> Hi Asanka,
>>
>> The cron expression for every night at midnight is: 0 0 * * *
>>
>> 0 0 0 * * is not a valid cron expression as the 3rd field (day of month)
>> cannot be a 0.
>>
>> Here is an online cron editor that can help build your cron expressions:
>> https://crontab.guru/
>>
>> Also here is simple cron tester to see the next n iterations of your cron
>> expression: http://cron.schlitt.info/
>>
>> -Chad
>>
>> On Dec 31, 2018, at 2:04 AM, Asanka Sanjaya <an...@gmail.com> wrote:
>>
>> Hello,
>>
>> I use a cron-driven processor to start the workflow and the expression is:
>>
>> 0 0 0 * * ?
>>
>> I expect the processor to run each day at 00:00 hours. But it runs each
>> hour instead.
>>
>> Processor configuration:
>> <image.png>
>>
>>
>> Flow:
>>
>> <image.png>
>>
>> What could be the possible reasons for this?
>>
>>
>> --
>>
>> *Thanks,*
>> Asanka Sanjaya Herath
>> Senior Software Engineer | Zone24x7
>>
>>
>>
>
> --
>
> *Thanks,*
>
> Asanka Sanjaya Herath
>
> Senior Software Engineer | Zone24x7
>
--
*Thanks,*
Asanka Sanjaya Herath
Senior Software Engineer | Zone24x7
Re: Cron-schedule not working
Posted by Asanka Sanjaya <an...@gmail.com>.
Thanks Chad!
On Mon, Dec 31, 2018 at 6:22 PM Chad Woodhead <ch...@gmail.com>
wrote:
> Hi Asanka,
>
> The cron expression for every night at midnight is: 0 0 * * *
>
> 0 0 0 * * is not a valid cron expression as the 3rd field (day of month)
> cannot be a 0.
>
> Here is an online cron editor that can help build your cron expressions:
> https://crontab.guru/
>
> Also here is simple cron tester to see the next n iterations of your cron
> expression: http://cron.schlitt.info/
>
> -Chad
>
> On Dec 31, 2018, at 2:04 AM, Asanka Sanjaya <an...@gmail.com> wrote:
>
> Hello,
>
> I use a cron-driven processor to start the workflow and the expression is:
>
> 0 0 0 * * ?
>
> I expect the processor to run each day at 00:00 hours. But it runs each
> hour instead.
>
> Processor configuration:
> <image.png>
>
>
> Flow:
>
> <image.png>
>
> What could be the possible reasons for this?
>
>
> --
>
> *Thanks,*
> Asanka Sanjaya Herath
> Senior Software Engineer | Zone24x7
>
>
>
--
*Thanks,*
Asanka Sanjaya Herath
Senior Software Engineer | Zone24x7
Re: Cron-schedule not working
Posted by Chad Woodhead <ch...@gmail.com>.
Hi Asanka,
The cron expression for every night at midnight is: 0 0 * * *
0 0 0 * * is not a valid cron expression as the 3rd field (day of month) cannot be a 0.
Here is an online cron editor that can help build your cron expressions: https://crontab.guru/ <https://crontab.guru/>
Also here is simple cron tester to see the next n iterations of your cron expression: http://cron.schlitt.info/ <http://cron.schlitt.info/>
-Chad
> On Dec 31, 2018, at 2:04 AM, Asanka Sanjaya <an...@gmail.com> wrote:
>
> Hello,
>
> I use a cron-driven processor to start the workflow and the expression is:
>
> 0 0 0 * * ?
>
> I expect the processor to run each day at 00:00 hours. But it runs each hour instead.
>
> Processor configuration:
> <image.png>
>
>
> Flow:
>
> <image.png>
>
> What could be the possible reasons for this?
>
>
> --
> Thanks,
> Asanka Sanjaya Herath
> Senior Software Engineer | Zone24x7