Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a java class for constructing a cron expression using a date?

Tags:

java

cron

I need to build a cron expression based on user input from a form. So I have a datepicker and a select box to choose the frequency. I can build a cron expression from this easily enough, but it feels like I am reinventing the wheel. Is there a suitable class to do this for me? Something with a method like

public String cron(String frequency, Calendar nextRunTime);
like image 704
Mark Chorley Avatar asked Feb 06 '26 15:02

Mark Chorley


1 Answers

I think the Cron-functionality in quartz could provide this for you, but you do have to do some programming to make it work. (http://www.quartz-scheduler.org/docs/tutorials/crontrigger.html)

This is if I understand your question correctly.

like image 105
Kurt Du Bois Avatar answered Feb 09 '26 07:02

Kurt Du Bois



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!