I used below Javascript API to create Quartz compatible UI to provide cron expression to server side quartz sevices.
https://github.com/felixruponen/jquery-cron
Do we have any API , which we can use to convert cron expressions into human readable strings in Java Script.
Thanks
A cron expression is a string consisting of six or seven subexpressions (fields) that describe individual details of the schedule. These fields, separated by white space, can contain any of the allowed values with various combinations of the allowed characters for that field.
*/5 * * * * Execute a cron job every 5 minutes. 0 * * * * Execute a cron job every hour.
A cron expression is a string that represents a set of times at which a task will be executed. The expression comprises six fields: second(0-59), minute(0-59), hour(0-23), day of month(1-31), month(1-12 or JAN-DEC), and day of week(0-6 or SUN-SAT).
Sponsor breejs/later * A javascript library for defining recurring schedules and calculating future (or past) occurrences for them. Includes support for using English phrases and Cron schedules.
I recently ported the Quartz compatible cron-expression-descriptor from C# to JavaScript and named it cRonstrue. This JavaScript library is able to convert a Quartz cron expression into a human readable string like this:
cronstrue.toString("0 23 ? * MON-FRI");
> "At 11:00 PM, Monday through Friday"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With