Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 08 10:12

    jmrozanec on master

    Test for https://github.com/jmr… Merge pull request #500 from ss… (compare)

  • Nov 16 05:40

    jmrozanec on master

    Update README.md (compare)

  • Nov 14 21:53

    jmrozanec on master

    Add alternative pom.xml, with u… (compare)

  • Nov 14 21:44

    jmrozanec on master

    Update pom.xml -> 9.1.7-SNAPSHO… (compare)

  • Nov 14 21:40

    jmrozanec on 9.1.6

    (compare)

  • Nov 14 21:39

    jmrozanec on master

    Update pom.xml towards JDK8, fo… pom.xml -> 9.1.6 (compare)

  • Nov 14 21:28

    jmrozanec on master

    Issue #493: update code towards… (compare)

  • Oct 30 13:12

    jmrozanec on master

    Resolve RCE vulnerability. Mak… Merge pull request #494 from Ni… (compare)

  • Oct 30 13:11

    jmrozanec on master

    Update CronValidator.java Merge pull request #493 from pw… (compare)

  • Oct 30 13:11

    jmrozanec on master

    Fix mapping of interval for the… Merge branch 'hibnico-fix-inter… (compare)

  • Oct 15 07:21

    jmrozanec on master

    fixed some tests in italian Merge pull request #492 from al… (compare)

  • Oct 10 19:05

    jmrozanec on master

    Update pom.xml with JDK 16. (compare)

  • Oct 10 18:53

    jmrozanec on master

    #446 when dst overlaps, skip du… Merge pull request #490 from In… (compare)

  • Oct 10 18:53

    jmrozanec on master

    Enable unit tests for #430 and … Merge pull request #489 from In… (compare)

  • Oct 10 18:52

    jmrozanec on master

    See #480 The unit test didn't … retain only jdk 16 github test … Merge pull request #488 from In… (compare)

  • Oct 10 18:52

    jmrozanec on master

    test for java 17 Merge pull request #487 from al… (compare)

  • Oct 06 07:32

    jmrozanec on master

    Merge pull request #3 from jmro… Merge branch 'jmrozanec:master'… removed unused import and 3 more (compare)

  • Oct 03 06:22

    jmrozanec on master

    Describe "always ..." for HHMMSS Update .gitignore. Update pom.x… Merge branch 'mccartney-fixing-… (compare)

  • Sep 13 10:00

    jmrozanec on master

    Issue 480 test sout -> logger Merge remote-tracking branch 'o… and 1 more (compare)

  • Jun 28 07:57

    jmrozanec on master

    Add an Automatic-Module-Name T… Merge pull request #479 from oc… (compare)

Sorin Iulus
@soriniulus
Exception in thread "main" java.lang.IllegalArgumentException: Failed to parse '0 0 0 24 1/12 ?'. Period 12 not in range (0, 11]
at com.cronutils.parser.CronParser.parse(CronParser.java:100)
at com.tangoe.optimus.util.CronTest.main(CronTest.java:20)
Caused by: java.lang.IllegalArgumentException: Period 12 not in range (0, 11]
at com.cronutils.model.field.expression.visitor.ValidationFieldExpressionVisitor.isPeriodInRange(ValidationFieldExpressionVisitor.java:176)
at com.cronutils.model.field.expression.visitor.ValidationFieldExpressionVisitor.visit(ValidationFieldExpressionVisitor.java:125)
at com.cronutils.model.field.expression.visitor.ValidationFieldExpressionVisitor.visit(ValidationFieldExpressionVisitor.java:66)
at com.cronutils.model.field.expression.FieldExpression.accept(FieldExpression.java:44)
at com.cronutils.model.Cron.validate(Cron.java:92)
at com.cronutils.parser.CronParser.parse(CronParser.java:98)
... 1 more
Matthias
@Naxos84
That is what I was expecting before checking that your expression was valid at freeformatter.com
Why dont you use 0 0 0 24 1 ?
jmrozanec
@jmrozanec
@soriniulus may we ask you which cron definition do you use? Thank you for reporting this - may we ask you to file an issue with a test?
jmrozanec
@jmrozanec
@soriniulus we filed the issue under #281 Thank you for reporting it!
Sorin Iulus
@soriniulus
Hello, I added a comment under opened issue. You are right CronType.QUARTZ is used. I'm not sure if I can use 0 0 0 24 1, I'm not interesting in triggering the job in January or a specific month for that matter, I'm interested that that job is triggered every other n-th month .
Matthias
@Naxos84
If you check "0 0 0 24 1/12 ? " at https://www.freeformatter.com/cron-expression-generator-quartz.html the next execution dates are: Wed Jan 24 00:00:00 UTC 2018
Thu Jan 24 00:00:00 UTC 2019
Fri Jan 24 00:00:00 UTC 2020
Sun Jan 24 00:00:00 UTC 2021
Mon Jan 24 00:00:00 UTC 2022
Tue Jan 24 00:00:00 UTC 2023
Wed Jan 24 00:00:00 UTC 2024
Fri Jan 24 00:00:00 UTC 2025
Could please explain your usecase a little bit more. If possible give some expected "next execution dates"
Sorin Iulus
@soriniulus
One of the scenarios we need for our scheduler is to be able to define the recurrence as: "on the X-th day every other N-th months".
These two values X and N are user-input fields in the UI, X ranging from 1 to 28 and N ranging from 1 to 12.
The next execution date is computed based on the last succesful execution date, so for example:
If the last execution date was 2017-11-24 and the job should run on the 24th every other 3 months, then the next execution dates should be:
2018-02-24
2018-05-24
2018-08-24
Matthias
@Naxos84
@soriniulus ok. that makes it a little bit more clear. One more question:
Is "every other 12 month" OR "every other 13 months" OR even more really a valid use case?
Sorin Iulus
@soriniulus
@Naxos84 The short answer is "no". At least for the moment. But we need to cover these scenarios as well... you know clients ;)
Matthias
@Naxos84
you know clients Yes I do know. ;)
jmrozanec
@jmrozanec
@soriniulus can we add this details to another issue? The later description seems a feature request :smile: Thanks!
Sorin Iulus
@soriniulus
yes, of course :)
Sorin Iulus
@soriniulus
still, "every 13 months" won't be the case, we will not implement that, so for now we only need the 12 months recurrence
jmrozanec
@jmrozanec
@soriniulus no problem! If this is something we can tackle, please open an issue describing the case and tag it as a feature request :smile:
Matthias
@Naxos84
something seems to be wrong with the sonar-scanner command in travis build.
jmrozanec
@jmrozanec
@Naxos84 we will review the issue. Thanks!
Matthias
@Naxos84
sonar-scanner still exits with code 127
maybe consider adding jacoco-maven-plugin to pull requests too!?
Also consider using https://docs.travis-ci.com/user/sonarcloud/#SonarQube-Scanner-for-Maven
in .travis.yml instead of "sonar-scanner"
jmrozanec
@jmrozanec
@Naxos84 yesterday we reviewed the settings, included the jacoco goals along with the sonar-scanner and everything worked ok. If now is failing to build, please review the changes.
jmrozanec
@jmrozanec
@/all we reached 100 forks! 🎉🎉🎉🎉 Thank you all for supporting cron-utils! :smile:
Xin Wang
@lovepoem
👏👏👏
Matthias
@Naxos84
Happy new year to everyone!
jmrozanec
@jmrozanec
@/all Happy New Year! :smile:
jmrozanec
@jmrozanec
@/all New release available! Details available here Many thanks to @Naxos84 @SvenssonWeb @rhanton @jpotts2 @tanyona @meincs @curioustechizen ! :smile:
Anshul Garg
@garganshu
is there any cron-utils library which i can use in android studio
for my android project?
jmrozanec
@jmrozanec
@garganshu sure! You can use the versiones 6.x.y That should work well. Please let us know if you have any issues. You can expect a new release soon with the fix proposed at #309
Anshul Garg
@garganshu
I m new to android. So, can you tell me the steps on how to add on the library in my project?
bdw thanks @jmrozanec
Francis De Brabandere
@francisdb
hey @jmrozanec :+1: for managing this project like a boss
and of course also :+1: for all contributors!
jmrozanec
@jmrozanec
@francisdb Thanks! :smile:
@garganshu I would suggest to check the snippet for the corresponding version at mvn-repository You will find snippets on how to declare the dependency for various dependency managers (for Android you will be most probably using Gradle) Let us know if you need further help on this. Best!
jmrozanec
@jmrozanec
@/all we now support weekdays computation between two dates! You can choose a weekend policy, specify holidays and get an accurate count :smile:
Gowtham Kittusamy
@gowtk
Hi Team , Please remove the log4j.properties file in the cron-utils-7.0.1 jar, Its overriding our own logging mechanism
jmrozanec
@jmrozanec
@gowtk Hi! will work on that and create a new release asap :smile: You are also welcome to contribute!
Gowtham Kittusamy
@gowtk
@jmrozanec Thanks team
jmrozanec
@jmrozanec
@/all we received jmrozanec/cron-utils#318 if would be possible to handle multiple crons in a single expression. We commented on how this could be achieved when building a string pattern and started developing the feature in a branch. We would be glad to hear opinions and suggestions regarding the feature and its implementation.
jmrozanec
@jmrozanec
@/all multi-cron support is implemented! A new release will follow this weekend! We are working on how to provide better human readable descriptions and experimenting if some machine learning can be applied to achieve it. If anyone would like to jump in, is welcome to do so! The reference issue will be jmrozanec/cron-utils#3
Daniel Stauffer
@nerd-shark
@/all I'm trying to use Quartz cron expression: <0/60 * * * * ?>, but am getting an IllegalArgumentException: Period 60 not in range (0, 59] (java.lang.IllegalArgumentException)
com.cronutils.model.field.expression.visitor.ValidationFieldExpressionVisitor:173 (null)
Daniel Stauffer
@nerd-shark
that is a good cron expression afaik
Francis De Brabandere
@francisdb
@nerd-shark please create a ticket, looks like a bug indeed
Matthias
@Naxos84
Every 60 seconds is the same as every minute. 0 ? Which means every minute at second 0.
jmrozanec
@jmrozanec
@Naxos84 @francisdb thanks for jumping in! @nerd-shark If considered a valid expression, please file a ticket with a test case and we will consider the issue. Contributions are always welcome! :smile:
Phani Cherukuri
@phanicherukuri
Hi,
My company has a spring-boot micro-service applications, and I am looking for a jobs which can perform "git pull", "git pull before push". Is there any way to write such jobs for Java applications (btw we're using GITLAB as a SCM), I know that there is cron API for PHP applications, is there any such thing for Java applications also?
jmrozanec
@jmrozanec
Sure there is! We have no mature scheduler yet, so will advise you to use Quartz for job scheduling.
jmrozanec
@jmrozanec
@/all New release available! Details available here Many thanks to @hokkun-dayo @catharsis @Naxos84 @kangtajt007 @SvenssonWeb @mattadamson @TuomasKiviaho @alenkacz @kensipe @roddy @toby1984 @morvael @francisdb @MrKulp for reporting issues, discussing them and submitting PRs with fixes and features. The new release includes an updated Dutch translation, bugfixes such as avoid an infinite loop when seeking impossible dates, truncation at milliseconds level when computing past executions; and features such as workdays computation for next/past executions, support for multiple cron expressions in a single expression and crons serialization.
Xin Wang
@lovepoem
👏👏👏