-
-
Notifications
You must be signed in to change notification settings - Fork 199
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 syntax #40
Comments
Thanks! I want to be able to support cron-patterns, and ideally we would use some existing cron-library for it, but my problem is that I do not want to add a dependency for it. So there are a few options, but I am currently undecided:
For now you can come reasonably close using May I ask what type of cron-pattern do you have need for? |
Very good. This is also my approach in my projects.
Personal, I think that variant three (3) is the best (no need to invest time in cron parser). You can mark the dependency to cron-parser library as optional. When you need cron syntax you must include the cron-parser dependency.
For the moment I need to run at a time, only on workday (from Monday to Friday). I think that add support for cron syntax is a nice feature. In the same time I like to preserve minimalist aspect (very few dependency and small size) of library. In this context it's necessary a cron-parser library with the same profile like this (minimalist and active maintained) . |
Do you know of any good cron-libraries? |
A candidate could be cron-utils. Related to my requirement, I think that for the moment I can check in the execution-handler method if the current day is a workday or not. It's not ideal but I think that it works. By the way, another idea about where to put the new feature (support cron syntax) is to convert your project in a multi modules Maven project and to add a new |
Ok, will look into it. Instead of checking in the execution-handler method for workday, you could just write your own implementation of the |
I will try. I want to schedule some tasks from Monday to Friday between 9 AM and 17 PM with a period of 10 minutes (eventually with small delay). I hope that is possible. |
Implemented in PR #56 |
First of all, congratulations for this library.
I want to ask if it's a possibility to use a Cron syntax when I schedule a task/job.
The text was updated successfully, but these errors were encountered: