title: Nifi expression - evaluate cron and current timestamp?
body: <p>I know and have used the standard Nifi generateFlowFileProcessor running on a cron schedule. As an example lets assumme my nifi flow will execute a SQL DELETE and INSERT statement for two groups of tables on two schedule times.</p>
  <p>The simplest implementation will have two generateFlowFileProcessors running on the different schedules,</p>
  <pre><code>Nifi Cron Expression -&gt; Group
  0 0/15 * * * * ? -&gt; 15min tables schedule
  0 0/30 * * * * ? -&gt; 30min tables schedule 
  </code></pre>
  <p>which load the list tables from a json file which then split to result in each table getting reloaded.</p>
  <pre><code>{
  &quot;tablesToLoad&quot;:
      [
          {
          &quot;sourceTable&quot;: &quot;TableA&quot;,
          &quot;targetTable&quot;: &quot;TableB&quot;,
          },
          {
          &quot;sourceTable&quot;: &quot;TableC&quot;,
          &quot;targetTable&quot;: &quot;TableD&quot;,
          }
      ]
  }
  </code></pre>
  <p>My problem is this doesn't scale well, if need to add other schedules and more table groups. I need to add more generateFlowFileProcessors and schedules to the flow for each reconfiguration.</p>
  <p>My preference is to have a single generateFlowFileProcessor which runs on a 5min schedule. The exact schedule that each table runs will be defined as part of the externally loaded config json blob</p>
  <pre><code>{
  &quot;tablesToLoad&quot;:
      [
          {
          &quot;sourceTable&quot;: &quot;TableA&quot;,
          &quot;targetTable&quot;: &quot;TableB&quot;,
          &quot;schedule&quot;: &quot;0 0/15 * * * * ?&quot;
          },
          {
          &quot;sourceTable&quot;: &quot;TableC&quot;,
          &quot;targetTable&quot;: &quot;TableD&quot;,
          &quot;schedule&quot;: &quot;0 0/30 * * * * ?&quot;
          },
          {
          &quot;sourceTable&quot;: &quot;TableC&quot;,
          &quot;targetTable&quot;: &quot;TableD&quot;,
          &quot;schedule&quot;: &quot;0 0 0/5 * * * ?&quot;
          }
      ]
  }
  </code></pre>
  <p>Given that the flowFile will be generated with a currentTimeStamp, is there a simple or recommended way in which I could evalue the $schedule expression above with the currentTimestamp to determine if the cron expression matches or not?</p>