here is the attached file, please remove the .txt extension.

________________________________
From: Keith Lim
Sent: Thursday, June 16, 2016 10:13 AM
To: [email protected]
Subject: Re: Scheduling using CRON driven on Windows OS


My GenerateFlowFile processor is enabled and started

with


Scheduling Strategy: Cron Driven

Run Schedule : 02 10 * * * ?


This I expects to generate a flow file daily at 10:02 am, but from my limited 
test, it seems to take the second parameter as minutes, and generate a flowfile 
hourly at 10 minutes after the hour, e.g. 10:10, 11:10, 12:10, 13:10...

Perhaps there is a bug in parsing system date format?


Attached is a simple template that I am using for testing.


Thanks,
Keith


________________________________
From: Andrew Grande <[email protected]>
Sent: Wednesday, June 15, 2016 4:10 PM
To: [email protected]
Subject: Re: Scheduling using CRON driven on Windows OS


Keith,

Was your processor running at all times? It has to be started and enabled.

I guess sharing the cron expression and maybe a quick screenshot will help next.

Andrew

On Wed, Jun 15, 2016, 6:58 PM Keith Lim 
<[email protected]<mailto:[email protected]>> wrote:
I tried setting Scheduling Strategy property to CRON Driven but does not seem 
to work.   Sometimes it would fire when not expected to and others not fire 
when expected to.
This is on Windows OS and the processor I tried was GenerateFlowFile.  Is CRON 
Driven setting not designed to work on Windows OS?

Thanks,
Keith


<?xml version="1.0" encoding="UTF-8" 
standalone="yes"?><template><description></description><name>TestStartOfWorkflowWithCron</name><snippet><connections><id>0dccd60a-e6b1-4cb0-b456-b7871d868079</id><parentGroupId>d00205e6-5e99-44aa-9309-5a03d29f81d3</parentGroupId><backPressureDataSizeThreshold>0
 
MB</backPressureDataSizeThreshold><backPressureObjectThreshold>0</backPressureObjectThreshold><destination><groupId>d00205e6-5e99-44aa-9309-5a03d29f81d3</groupId><id>091dda05-efac-4d43-8db3-245e84977b5c</id><type>PROCESSOR</type></destination><flowFileExpiration>0
 
sec</flowFileExpiration><labelIndex>1</labelIndex><name></name><selectedRelationships>success</selectedRelationships><source><groupId>d00205e6-5e99-44aa-9309-5a03d29f81d3</groupId><id>f4c3f4ea-0a4c-4c38-8928-870300525884</id><type>PROCESSOR</type></source><zIndex>0</zIndex></connections><processors><id>f4c3f4ea-0a4c-4c38-8928-870300525884</id><parentGroupId>d00205e6-5e99-44aa-9309-5a03d29f81d3</parentGroupId><position><x>-4968.752054017811</x><y>-1508.5169639774704</y></position><config><bulletinLevel>WARN</bulletinLevel><comments></comments><concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount><defaultConcurrentTasks><entry><key>TIMER_DRIVEN</key><value>1</value></entry><entry><key>EVENT_DRIVEN</key><value>0</value></entry><entry><key>CRON_DRIVEN</key><value>1</value></entry></defaultConcurrentTasks><defaultSchedulingPeriod><entry><key>TIMER_DRIVEN</key><value>0
 sec</value></entry><entry><key>CRON_DRIVEN</key><value>* * * * * 
?</value></entry></defaultSchedulingPeriod><descriptors><entry><key>File 
Size</key><value><description>The size of the file that will be 
used</description><displayName>File 
Size</displayName><dynamic>false</dynamic><name>File 
Size</name><required>true</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Batch
 Size</key><value><defaultValue>1</defaultValue><description>The number of 
FlowFiles to be transferred in each invocation</description><displayName>Batch 
Size</displayName><dynamic>false</dynamic><name>Batch 
Size</name><required>true</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Data
 
Format</key><value><allowableValues><displayName>Binary</displayName><value>Binary</value></allowableValues><allowableValues><displayName>Text</displayName><value>Text</value></allowableValues><defaultValue>Binary</defaultValue><description>Specifies
 whether the data should be Text or Binary</description><displayName>Data 
Format</displayName><dynamic>false</dynamic><name>Data 
Format</name><required>true</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Unique
 
FlowFiles</key><value><allowableValues><displayName>true</displayName><value>true</value></allowableValues><allowableValues><displayName>false</displayName><value>false</value></allowableValues><defaultValue>false</defaultValue><description>If
 true, each FlowFile that is generated will be unique. If false, a random value 
will be generated and all FlowFiles will get the same content but this offers 
much higher throughput</description><displayName>Unique 
FlowFiles</displayName><dynamic>false</dynamic><name>Unique 
FlowFiles</name><required>true</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry></descriptors><lossTolerant>false</lossTolerant><penaltyDuration>30
 sec</penaltyDuration><properties><entry><key>File Size</key><value>1 
B</value></entry><entry><key>Batch 
Size</key><value>1</value></entry><entry><key>Data 
Format</key><value>Text</value></entry><entry><key>Unique 
FlowFiles</key><value>false</value></entry></properties><runDurationMillis>0</runDurationMillis><schedulingPeriod>02
 10 * * * 
?</schedulingPeriod><schedulingStrategy>CRON_DRIVEN</schedulingStrategy><yieldDuration>0
 
sec</yieldDuration></config><name>TestStartOfWorkflowWithCron</name><relationships><autoTerminate>false</autoTerminate><description></description><name>success</name></relationships><state>RUNNING</state><style/><supportsEventDriven>false</supportsEventDriven><supportsParallelProcessing>true</supportsParallelProcessing><type>org.apache.nifi.processors.standard.GenerateFlowFile</type></processors><processors><id>091dda05-efac-4d43-8db3-245e84977b5c</id><parentGroupId>d00205e6-5e99-44aa-9309-5a03d29f81d3</parentGroupId><position><x>-4952.56230500716</x><y>-1309.186652899959</y></position><config><bulletinLevel>WARN</bulletinLevel><comments></comments><concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount><defaultConcurrentTasks><entry><key>TIMER_DRIVEN</key><value>1</value></entry><entry><key>EVENT_DRIVEN</key><value>0</value></entry><entry><key>CRON_DRIVEN</key><value>1</value></entry></defaultConcurrentTasks><defaultSchedulingPeriod><entry><key>TIMER_DRIVEN</key><value>0
 sec</value></entry><entry><key>CRON_DRIVEN</key><value>* * * * * 
?</value></entry></defaultSchedulingPeriod><descriptors><entry><key>Directory</key><value><description>The
 directory to which files should be written. You may use expression language 
such as 
/aa/bb/${path}</description><displayName>Directory</displayName><dynamic>false</dynamic><name>Directory</name><required>true</required><sensitive>false</sensitive><supportsEl>true</supportsEl></value></entry><entry><key>Conflict
 Resolution 
Strategy</key><value><allowableValues><displayName>replace</displayName><value>replace</value></allowableValues><allowableValues><displayName>ignore</displayName><value>ignore</value></allowableValues><allowableValues><displayName>fail</displayName><value>fail</value></allowableValues><defaultValue>fail</defaultValue><description>Indicates
 what should happen when a file with the same name already exists in the output 
directory</description><displayName>Conflict Resolution 
Strategy</displayName><dynamic>false</dynamic><name>Conflict Resolution 
Strategy</name><required>true</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Create
 Missing 
Directories</key><value><allowableValues><displayName>true</displayName><value>true</value></allowableValues><allowableValues><displayName>false</displayName><value>false</value></allowableValues><defaultValue>true</defaultValue><description>If
 true, then missing destination directories will be created. If false, 
flowfiles are penalized and sent to failure.</description><displayName>Create 
Missing Directories</displayName><dynamic>false</dynamic><name>Create Missing 
Directories</name><required>true</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Maximum
 File Count</key><value><description>Specifies the maximum number of files that 
can exist in the output directory</description><displayName>Maximum File 
Count</displayName><dynamic>false</dynamic><name>Maximum File 
Count</name><required>false</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Last
 Modified Time</key><value><description>Sets the lastModifiedTime on the output 
file to the value of this attribute.  Format must be yyyy-MM-dd'T'HH:mm:ssZ.  
You may also use expression language such as 
${file.lastModifiedTime}.</description><displayName>Last Modified 
Time</displayName><dynamic>false</dynamic><name>Last Modified 
Time</name><required>false</required><sensitive>false</sensitive><supportsEl>true</supportsEl></value></entry><entry><key>Permissions</key><value><description>Sets
 the permissions on the output file to the value of this attribute.  Format 
must be either UNIX rwxrwxrwx with a - in place of denied permissions (e.g. 
rw-r--r--) or an octal number (e.g. 644).  You may also use expression language 
such as 
${file.permissions}.</description><displayName>Permissions</displayName><dynamic>false</dynamic><name>Permissions</name><required>false</required><sensitive>false</sensitive><supportsEl>true</supportsEl></value></entry><entry><key>Owner</key><value><description>Sets
 the owner on the output file to the value of this attribute.  You may also use 
expression language such as 
${file.owner}.</description><displayName>Owner</displayName><dynamic>false</dynamic><name>Owner</name><required>false</required><sensitive>false</sensitive><supportsEl>true</supportsEl></value></entry><entry><key>Group</key><value><description>Sets
 the group on the output file to the value of this attribute.  You may also use 
expression language such as 
${file.group}.</description><displayName>Group</displayName><dynamic>false</dynamic><name>Group</name><required>false</required><sensitive>false</sensitive><supportsEl>true</supportsEl></value></entry></descriptors><lossTolerant>false</lossTolerant><penaltyDuration>30
 
sec</penaltyDuration><properties><entry><key>Directory</key><value>C:\Temp\LogToFile</value></entry><entry><key>Conflict
 Resolution Strategy</key><value>fail</value></entry><entry><key>Create Missing 
Directories</key><value>true</value></entry><entry><key>Maximum File 
Count</key></entry><entry><key>Last Modified 
Time</key></entry><entry><key>Permissions</key></entry><entry><key>Owner</key></entry><entry><key>Group</key></entry></properties><runDurationMillis>0</runDurationMillis><schedulingPeriod>0
 
sec</schedulingPeriod><schedulingStrategy>TIMER_DRIVEN</schedulingStrategy><yieldDuration>1
 
sec</yieldDuration></config><name>LogToFile</name><relationships><autoTerminate>true</autoTerminate><description>Files
 that could not be written to the output directory for some reason are 
transferred to this 
relationship</description><name>failure</name></relationships><relationships><autoTerminate>true</autoTerminate><description>Files
 that have been successfully written to the output directory are transferred to 
this 
relationship</description><name>success</name></relationships><state>DISABLED</state><style><entry><key>background-color</key><value>#ff0000</value></entry></style><supportsEventDriven>false</supportsEventDriven><supportsParallelProcessing>true</supportsParallelProcessing><type>org.apache.nifi.processors.standard.PutFile</type></processors></snippet><timestamp>06/16/2016
 10:03:57 PDT</timestamp></template>

Reply via email to