Skip to content

CronScheduler feature using JDKs ScheduledExecutorService#491

Closed
norbertroamsys wants to merge 1 commit intojmrozanec:masterfrom
norbertroamsys:master
Closed

CronScheduler feature using JDKs ScheduledExecutorService#491
norbertroamsys wants to merge 1 commit intojmrozanec:masterfrom
norbertroamsys:master

Conversation

@norbertroamsys
Copy link
Copy Markdown
Contributor

Hi cron-utils core developers!

We are using this library since the beginning of this year and found it really helpful and easy to use. Well done guys 👍!

We use the parsing of cron expressions and also the describe functionality.
For executing our jobs we decided not to use quartz-scheduler or Spring because our requirements are quite simple.
We decided to create a simple scheduler based on your ExecutionTime class.
The only additional dependency is Javas ScheduledExecutorService.

We thing this approach maybe sufficient for other users too.
That's why we wanted to share the code with you and asking you to verify whether this makes sense!
Of course: Cron-utils focus is not for providing a scheduling framework like quarz. But this couple of code lines is far away from that indeed ;-).

The JUnit test should show the general functionality.
If you prefer a different packaging or code styling please feel free to comment and request for this.
An additional chapter for the README.md can also be provided.
We are also not angry if you decide to close the pull request because such kind of feature are out of scope for you.

Looking forward to hear from you ...

@jmrozanec
Copy link
Copy Markdown
Owner

jmrozanec commented Oct 13, 2021

@norbertroamsys thanks! 😄 We are glad the library is useful and easy to use! 🚀 Thanks for this implementation! We have done something similar at cron-utils-scheduler but perhaps makes sense to include a basic schedulling functionality at the core library. We will review the PR soon, and let you know. Thanks! Best!

@norbertroamsys
Copy link
Copy Markdown
Contributor Author

Hi @jmrozanec ,
I was not aware of the cron-utils-scheduler and also saw that it is in an really early project state ;-).
But anyway: It addresses the same functionality than this pull request does!

So I am also ok to check how I can use this project for our needs. If something is missing I can also provide a pull request for that.
But please check and let me know about your thoughts and how we should go on!

Additional questions:

  • Are there already plans for a first release of cron-utils-scheduler available in Maven central repository?
  • When will cron-utils 9.1.6 be released?

Regards and also all the best!

@jmrozanec
Copy link
Copy Markdown
Owner

@norbertroamsys we like that enthusiasm! 😄 We can release new versions for both projects over this weekend. We agree the cron-utils-scheduler is a very early stage implementation. When developing it, we did not commit to a fully-fledged scheduler comparable to Quartz, but just wanted to provide a lightweight scheduler leveraging all the functionality developed at cron-utils - similar to your PR 😄 Thank you for using cron-utils, and pushing our boundaries forward!

@norbertroamsys
Copy link
Copy Markdown
Contributor Author

norbertroamsys commented Oct 15, 2021

@jmrozanec I just forked cron-utils-scheduler and still checking the code.
Current impression: It's to early to release it on Maven central repository. But I think I can suggest changes to fulfill our needs.

Some first ideas I already have:

  • Make a repacking from com.cronutils to com.cronutils.scheduler
  • Clean up dependencies in pom.xml. There are a lot of libraries not needed so far. E.g. org.threeten.bp.ZonedDateTime (instead of java.time.ZonedDateTime) seems to be used by mistake?! This was also a compile error I fixed locally to make it compile ;-).
  • Move Main to a JUnit test.
  • Use a Runnable as Parameter instead of inheritance in of Job class (already suggested in README.md).

There are some more ideas...

So one step back:

  • Is the project still used by anyone?
  • Am I allowed to suggest this changes and push them by pull request directly to the repository?
  • Should we do the further discussion in a separate issue in the cron-utils-scheduler project?

Thanks so far!

@jmrozanec
Copy link
Copy Markdown
Owner

@norbertroamsys please go ahead with the suggested changes! 😄 No need to ask for permission to push PRs - we always welcome them! 😄 🚀 We can continue the discussion there, referencing this issue just for traceability purposes. Thanks!

@norbertroamsys
Copy link
Copy Markdown
Contributor Author

Closed because feature request is tracked by jmrozanec/cron-utils-scheduler#7

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants