You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/10/30 18:48:00 UTC

[jira] [Commented] (NIFI-12290) Move from Quartz to Spring Cron Expression

    [ https://issues.apache.org/jira/browse/NIFI-12290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17781089#comment-17781089 ] 

ASF subversion and git services commented on NIFI-12290:
--------------------------------------------------------

Commit 786784ef62188b2b018ee262c2e8a750fb507789 in nifi's branch refs/heads/main from David Handermann
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=786784ef62 ]

NIFI-12290 Migrated from Quartz to Spring for Cron Expressions

- Removed support for Year field in Cron Expressions
- Changed numeric Day of Week field from starting with 1 to starting with 0
- Removed Quartz and C3P0 from Notice files

This closes #7951

Signed-off-by: Mike Moser <mo...@apache.org>


> Move from Quartz to Spring Cron Expression
> ------------------------------------------
>
>                 Key: NIFI-12290
>                 URL: https://issues.apache.org/jira/browse/NIFI-12290
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>            Reporter: David Handermann
>            Assignee: David Handermann
>            Priority: Major
>             Fix For: 2.latest
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> The Quartz library supports [cron|https://en.wikipedia.org/wiki/Cron] expression parsing to enable framework component scheduling using the Cron strategy.
> The Quartz library includes several legacy dependencies on HikariCP and C3P0 which are not necessary for framework operations. The Quartz library also relies on {{java.util.Date}} for calculation, as opposed to {{java.time}} components.
> Spring Framework 5.3 introduced new [Cron Expression capabilities|https://spring.io/blog/2020/11/10/new-in-spring-5-3-improved-cron-expressions] that provide standard compatibility with [Cron scheduling expressions|https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/scheduling/support/CronExpression.html]. The Spring CronExpression supports standard {{java.time}} classes.
> The Spring [CronExpression|https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/scheduling/support/CronExpression.html] has two differences from the Quartz implementation:
> 1. The Year field is not supported
> 2. The numeric day of the week representation begins with 0 instead of 1
> These differences follow the capabilities of the standard Unix crontab, and are not commonly used. However, these differences could invalidate custom scheduling configurations that used numeric day of the week or year values.
> Based on existing NiFI framework use of Spring, Quartz should be replaced with Spring Cron Expression parsing.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)