Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cron is invalid? #396

Closed
yangjiajun2014 opened this issue Sep 24, 2019 · 4 comments · Fixed by #399
Closed

Cron is invalid? #396

yangjiajun2014 opened this issue Sep 24, 2019 · 4 comments · Fixed by #399
Milestone

Comments

@yangjiajun2014
Copy link

Cron-utils says '0 0 12-0 ? * 3' is a valid cron when I use version 8.1.1.But when I updated to 9.0.1,'0 0 12-0 ? * 3' became invalid.

@jmrozanec
Copy link
Owner

@yangjiajun2014 thank you for reporting this. May we ask you to add more context? Ex.: which cron definition are you using and submit a test for it? Thanks!

@yangjiajun2014
Copy link
Author

I use CronType.QUARTZ.My code looks like:
CronDefinition cronDefinition = CronDefinitionBuilder.instanceDefinitionFor(CronType.QUARTZ);
CronParser parser=new CronParser(cronDefinition);
try {
parser.parse(cron);
} catch (Exception e) {
return false;
}
return true;

@pangyikhei
Copy link
Contributor

Quartz apparently supports overflowing ranges
See https://github.com/quartz-scheduler/quartz/blob/master/quartz-core/src/main/java/org/quartz/CronExpression.java

 * <li>Overflowing ranges is supported - that is, having a larger number on 
 * the left hand side than the right. You might do 22-2 to catch 10 o'clock 
 * at night until 2 o'clock in the morning, or you might have NOV-FEB. It is 
 * very important to note that overuse of overflowing ranges creates ranges 
 * that don't make sense and no effort has been made to determine which 
 * interpretation CronExpression chooses. An example would be 
 * "0 0 14-6 ? * FRI-MON". </li>

@jmrozanec I can work on this one.

pangyikhei added a commit to pangyikhei/cron-utils that referenced this issue Oct 5, 2019
pangyikhei added a commit to pangyikhei/cron-utils that referenced this issue Oct 5, 2019
mfateev pushed a commit to uber/cadence-java-client that referenced this issue Jan 13, 2020
* Upgrade gradle wrapper from 4.2 to 6.0 (#417)

To improve compilation time and fix numerous amount of issues alongside
other improvements that have been done throughout Gradle 5.0 and 6.0

* Update Gradle wrapper jar and properties (#417)
In order to work with the newest Gradle version, the Wrapper jar and
properties also have to be updated, so that Gradle knows how to download
it's executable
Gradle automatically downloads the Gradle executable through the
properties

* Introduce OpenJDK Alpine Docker base image (#417)
In order to have the smallest image possible, the Alpine image has to
be used. This will increase performance and will use less disk space
and network ingress.
This base image will reduce the final image size from 713MB down to
377MB, this all by using as minimum libraries as needed; for example by
removing the linux-gnu library.

* Update multiple Gradle dependencies+plugins (#417)
In order to keep up with the latest technology, benefit from the
fastest features and to improve security due to fixed issues and
bugs, there has to be a regular update for dependency and plugins.
Update multiple Gradle dependencies and plugins:
Plugins:
- thrift-gradle-plugin (0.4.0 -> 0.4.1)
- net.minecrell.licenser (0.3 -> 0.4.1)
- com.github.sherter.google-java-format (0.6 -> 0.8)
- net.ltgt.errorprone (0.6 -> 1.1.1)
- java -> java-library

Compile Dependencies:
com.google.errorprone:error_prone_core (2.3.1 -> 2.3.3)
com.uber.m3 (0.2.3 -> 0.4.0)
com.google.guava (27.0.1-jre -> 28.1-jre)

* Updated GSON dependency to 2.8.6 (#417)
In order to keep up with the latest technology, benefit from the
fastest features and to improve security due to fixed issues and
bugs, there has to be a regular update for dependency and plugins.
GSON 2.8.6 deprecates certain methods which will prevent usage of
these methods in the future.
https://github.com/google/gson/blob/master/CHANGELOG.md#version-286

* Removed deprecated JsonParser#parse (#417)
JsonParser#parse and the initialization of the JsonParser objects
were deprecated in version 2.8.6 of GSON.
In order to be complient with the newest version, the code was updated
to use the static JsonParser#parseString method.

* Updated cron-utils from 8.0.0 -> 9.0.0 (#417)
It has been over a year since the version of cron-utils has been
updated. This update will bring numerous amount of fixes with it
of which some will be linked in this commit message.
jmrozanec/cron-utils#394
jmrozanec/cron-utils#396
More to be found at: jmrozanec/cron-utils@8.1.1...master

* Remove copyright header and jvm args (#417)
In the previous gradle wrapper file and gradle bat file there
were no copyright headers and no default jvm arguments.
These have been removed to comply with previous wrapper files.

* Re-added Maven publishing (#417)

* Renamed mavenCustom -> maven (#417)

* Moved maven publish to publications (#417)

* Removed * import from JsonDataConverter (#417)
The start import is not used anywhere else in the project, in order to
keep the code design clean, the start import has to be removed.
NikitaNovozhilovWork pushed a commit to NikitaNovozhilovWork/cadence-java-client that referenced this issue Jan 15, 2020
* Upgrade gradle wrapper from 4.2 to 6.0 (uber#417)

To improve compilation time and fix numerous amount of issues alongside
other improvements that have been done throughout Gradle 5.0 and 6.0

* Update Gradle wrapper jar and properties (uber#417)
In order to work with the newest Gradle version, the Wrapper jar and
properties also have to be updated, so that Gradle knows how to download
it's executable
Gradle automatically downloads the Gradle executable through the
properties

* Introduce OpenJDK Alpine Docker base image (uber#417)
In order to have the smallest image possible, the Alpine image has to
be used. This will increase performance and will use less disk space
and network ingress.
This base image will reduce the final image size from 713MB down to
377MB, this all by using as minimum libraries as needed; for example by
removing the linux-gnu library.

* Update multiple Gradle dependencies+plugins (uber#417)
In order to keep up with the latest technology, benefit from the
fastest features and to improve security due to fixed issues and
bugs, there has to be a regular update for dependency and plugins.
Update multiple Gradle dependencies and plugins:
Plugins:
- thrift-gradle-plugin (0.4.0 -> 0.4.1)
- net.minecrell.licenser (0.3 -> 0.4.1)
- com.github.sherter.google-java-format (0.6 -> 0.8)
- net.ltgt.errorprone (0.6 -> 1.1.1)
- java -> java-library

Compile Dependencies:
com.google.errorprone:error_prone_core (2.3.1 -> 2.3.3)
com.uber.m3 (0.2.3 -> 0.4.0)
com.google.guava (27.0.1-jre -> 28.1-jre)

* Updated GSON dependency to 2.8.6 (uber#417)
In order to keep up with the latest technology, benefit from the
fastest features and to improve security due to fixed issues and
bugs, there has to be a regular update for dependency and plugins.
GSON 2.8.6 deprecates certain methods which will prevent usage of
these methods in the future.
https://github.com/google/gson/blob/master/CHANGELOG.md#version-286

* Removed deprecated JsonParser#parse (uber#417)
JsonParser#parse and the initialization of the JsonParser objects
were deprecated in version 2.8.6 of GSON.
In order to be complient with the newest version, the code was updated
to use the static JsonParser#parseString method.

* Updated cron-utils from 8.0.0 -> 9.0.0 (uber#417)
It has been over a year since the version of cron-utils has been
updated. This update will bring numerous amount of fixes with it
of which some will be linked in this commit message.
jmrozanec/cron-utils#394
jmrozanec/cron-utils#396
More to be found at: jmrozanec/cron-utils@8.1.1...master

* Remove copyright header and jvm args (uber#417)
In the previous gradle wrapper file and gradle bat file there
were no copyright headers and no default jvm arguments.
These have been removed to comply with previous wrapper files.

* Re-added Maven publishing (uber#417)

* Renamed mavenCustom -> maven (uber#417)

* Moved maven publish to publications (uber#417)

* Removed * import from JsonDataConverter (uber#417)
The start import is not used anywhere else in the project, in order to
keep the code design clean, the start import has to be removed.
alexshtin pushed a commit to temporalio/sdk-java that referenced this issue Jan 27, 2020
* Upgrade gradle wrapper from 4.2 to 6.0 (#417)

To improve compilation time and fix numerous amount of issues alongside
other improvements that have been done throughout Gradle 5.0 and 6.0

* Update Gradle wrapper jar and properties (#417)
In order to work with the newest Gradle version, the Wrapper jar and
properties also have to be updated, so that Gradle knows how to download
it's executable
Gradle automatically downloads the Gradle executable through the
properties

* Introduce OpenJDK Alpine Docker base image (#417)
In order to have the smallest image possible, the Alpine image has to
be used. This will increase performance and will use less disk space
and network ingress.
This base image will reduce the final image size from 713MB down to
377MB, this all by using as minimum libraries as needed; for example by
removing the linux-gnu library.

* Update multiple Gradle dependencies+plugins (#417)
In order to keep up with the latest technology, benefit from the
fastest features and to improve security due to fixed issues and
bugs, there has to be a regular update for dependency and plugins.
Update multiple Gradle dependencies and plugins:
Plugins:
- thrift-gradle-plugin (0.4.0 -> 0.4.1)
- net.minecrell.licenser (0.3 -> 0.4.1)
- com.github.sherter.google-java-format (0.6 -> 0.8)
- net.ltgt.errorprone (0.6 -> 1.1.1)
- java -> java-library

Compile Dependencies:
com.google.errorprone:error_prone_core (2.3.1 -> 2.3.3)
com.uber.m3 (0.2.3 -> 0.4.0)
com.google.guava (27.0.1-jre -> 28.1-jre)

* Updated GSON dependency to 2.8.6 (uber#417)
In order to keep up with the latest technology, benefit from the
fastest features and to improve security due to fixed issues and
bugs, there has to be a regular update for dependency and plugins.
GSON 2.8.6 deprecates certain methods which will prevent usage of
these methods in the future.
https://github.com/google/gson/blob/master/CHANGELOG.md#version-286

* Removed deprecated JsonParser#parse (uber#417)
JsonParser#parse and the initialization of the JsonParser objects
were deprecated in version 2.8.6 of GSON.
In order to be complient with the newest version, the code was updated
to use the static JsonParser#parseString method.

* Updated cron-utils from 8.0.0 -> 9.0.0 (uber#417)
It has been over a year since the version of cron-utils has been
updated. This update will bring numerous amount of fixes with it
of which some will be linked in this commit message.
jmrozanec/cron-utils#394
jmrozanec/cron-utils#396
More to be found at: jmrozanec/cron-utils@8.1.1...master

* Remove copyright header and jvm args (uber#417)
In the previous gradle wrapper file and gradle bat file there
were no copyright headers and no default jvm arguments.
These have been removed to comply with previous wrapper files.

* Re-added Maven publishing (uber#417)

* Renamed mavenCustom -> maven (uber#417)

* Moved maven publish to publications (uber#417)

* Removed * import from JsonDataConverter (#417)
The start import is not used anywhere else in the project, in order to
keep the code design clean, the start import has to be removed.
mfateev added a commit to temporalio/sdk-java that referenced this issue Mar 6, 2020
* Support get search attributes inside workflow (#409)

* Fix all javadoc warnings (#410)

* Fix empty result when get twice from search attributes (#412)

* Prepare release 2.6.3 (#413)

* Include clientImpl headers in java client RPC calls (#424)

* Travis CI:  use 'https' instead of 'http' (#420)

* Feature/gradle 4 2 to 6 0 openjdk 8 alpine docker base image (#426)

* Upgrade gradle wrapper from 4.2 to 6.0 (#417)

To improve compilation time and fix numerous amount of issues alongside
other improvements that have been done throughout Gradle 5.0 and 6.0

* Update Gradle wrapper jar and properties (#417)
In order to work with the newest Gradle version, the Wrapper jar and
properties also have to be updated, so that Gradle knows how to download
it's executable
Gradle automatically downloads the Gradle executable through the
properties

* Introduce OpenJDK Alpine Docker base image (#417)
In order to have the smallest image possible, the Alpine image has to
be used. This will increase performance and will use less disk space
and network ingress.
This base image will reduce the final image size from 713MB down to
377MB, this all by using as minimum libraries as needed; for example by
removing the linux-gnu library.

* Update multiple Gradle dependencies+plugins (#417)
In order to keep up with the latest technology, benefit from the
fastest features and to improve security due to fixed issues and
bugs, there has to be a regular update for dependency and plugins.
Update multiple Gradle dependencies and plugins:
Plugins:
- thrift-gradle-plugin (0.4.0 -> 0.4.1)
- net.minecrell.licenser (0.3 -> 0.4.1)
- com.github.sherter.google-java-format (0.6 -> 0.8)
- net.ltgt.errorprone (0.6 -> 1.1.1)
- java -> java-library

Compile Dependencies:
com.google.errorprone:error_prone_core (2.3.1 -> 2.3.3)
com.uber.m3 (0.2.3 -> 0.4.0)
com.google.guava (27.0.1-jre -> 28.1-jre)

* Updated GSON dependency to 2.8.6 (uber#417)
In order to keep up with the latest technology, benefit from the
fastest features and to improve security due to fixed issues and
bugs, there has to be a regular update for dependency and plugins.
GSON 2.8.6 deprecates certain methods which will prevent usage of
these methods in the future.
https://github.com/google/gson/blob/master/CHANGELOG.md#version-286

* Removed deprecated JsonParser#parse (uber#417)
JsonParser#parse and the initialization of the JsonParser objects
were deprecated in version 2.8.6 of GSON.
In order to be complient with the newest version, the code was updated
to use the static JsonParser#parseString method.

* Updated cron-utils from 8.0.0 -> 9.0.0 (uber#417)
It has been over a year since the version of cron-utils has been
updated. This update will bring numerous amount of fixes with it
of which some will be linked in this commit message.
jmrozanec/cron-utils#394
jmrozanec/cron-utils#396
More to be found at: jmrozanec/cron-utils@8.1.1...master

* Remove copyright header and jvm args (uber#417)
In the previous gradle wrapper file and gradle bat file there
were no copyright headers and no default jvm arguments.
These have been removed to comply with previous wrapper files.

* Re-added Maven publishing (uber#417)

* Renamed mavenCustom -> maven (uber#417)

* Moved maven publish to publications (uber#417)

* Removed * import from JsonDataConverter (#417)
The start import is not used anywhere else in the project, in order to
keep the code design clean, the start import has to be removed.

* Add default micrometer reporter (#432)

Add default micrometer reporter

Co-authored-by: NikitaNovozhilovWork <nikitanov@gmail.com>

* Use cadence-idl repo IDL storage (#427)

* Use cadence-idl repo IDL storage
* Delete thrift dir

Co-authored-by: Liang Mei <meiliang86@gmail.com>

* Switched the WorkflowExecution Promise callback to a workflow thread (#431)

Co-authored-by: Liang Mei <meiliang86@gmail.com>

* Implemented StartChildWorkflowExecutionParameters's ParentClosePolicy #433 (#437)

* Implemented StartChildWorkflowExecutionParameters's ParentClosePolicy #433
In order to support that ChildWorkflows have the ability to have a
ParentClosePolicy, the field has to be added.

* Added ParentClosePolicy to StateMachines #433

* Added ParentClosePolicy to testWorkflowInput #433

* Added ParentClosePolicy to ChildWorkflowOptions merge #433 (#438)

* Automatically update idl submodule on build #435 (#436)

* Add IDLs directory to gitignore #435
To leave the files on one place, the files coming from the submodule
repository should only stay on the submodule repository and not to be
included in the Java client repository.
Because of this, the IDLs folder should be ignored completely.

* Added initDlsSubmodule and updateDlsSubmodule task to gradle #435
In order to keep the master branch of the Dls repo up-to-date with the
Java Client, the building process has to have an updated list of thrift
files.

* Added git to Dockerfile #435
In order to support updating submodules, the Git package has to be added
to the JDK8 Alpine build image.

Co-authored-by: Maxim Fateev <mfateev@users.noreply.github.com>

* Implement Context Propagation for Java (#428)

This commit addresses uber/cadence-java-client#398 by adding support
for pluggable context propagation in workflow execution.

* Increase RPC timeout for list archived workflow API (#449)

* Added implementation of ResetWorkflowExecution service method (#448)

* Fixed UUID generation bug when using TestWorkflowService (#451)

* Support update search attribute inside workflow (#360) (#452)

Updated the TestWorkflowMutableStateImpl to ensure the UpsertWorkflowSearchAttributes is recorded to the history in the unit tests. Prior to this fix, tests that involve search attributes would
hit NonDeterminisicWorkflowError.

Co-authored-by: Liang Mei <meiliang86@gmail.com>

* Fix missing import (#459)

* Add activity type and workflow type tags for activity e2e metrics (#458)

* Add activity type and workflow type tags for activity e2e metrics
* fix test service
* Fix metrics test

* Removed merge conflicts

* Added back cadence-idl submodule

* Syntax errors fixed. Readme updated

* Fixed conflicts in non java files

* Resolved conflict in .gitignore

Co-authored-by: Bowei Xu <boweixu@uber.com>
Co-authored-by: Andrew Dawson <andrewjdawson2016@users.noreply.github.com>
Co-authored-by: sullis <github@seansullivan.com>
Co-authored-by: Remco Buddelmeijer <remco.buddelmeijer@gmail.com>
Co-authored-by: szaluzhskiy <stanislav.zaluzhsky@gmail.com>
Co-authored-by: NikitaNovozhilovWork <nikitanov@gmail.com>
Co-authored-by: wxing1292 <wxing1292@users.noreply.github.com>
Co-authored-by: Liang Mei <meiliang86@gmail.com>
Co-authored-by: Scott Rankin <scott@sdwr.net>
Co-authored-by: Yichao Yang <yycptt@gmail.com>
Co-authored-by: emrahs <emrahseker@gmail.com>
@jmrozanec jmrozanec added done and removed help wanted labels May 1, 2020
@jmrozanec jmrozanec added this to the next milestone May 1, 2020
@jmrozanec jmrozanec modified the milestones: next, 9.1.0 Jul 11, 2020
@jmrozanec
Copy link
Owner

@yangjiajun2014 @pangyikhei @mfaatev @NikitaNovozhilovWork a new version was released with the fixes. Please find details here Thank you for contributing to cron-utils!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants