Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

changleilei/cron-parser

Repository files navigation

cron-parser

Join the chat at https://gitter.im/grahamar/cron-parser Build Status Stories in Ready

A Java library that converts cron expressions into human readable strings. Translated to Java from https://github.com/bradyholt/cron-expression-descriptor.

Original Author & Credit: Brady Holt (http://www.geekytidbits.com) License: MIT

Features

  • Supports all cron expression special characters including * / , - ? L W, #.
  • Supports 5, 6 (w/ seconds or year), or 7 (w/ seconds and year) part cron expressions.
  • Provides casing options (Sentence, Title, Lower, etc.).
  • Support for non-standard non-zero-based week day numbers.
  • Supports printing to locale specific human readable format (Italian, English, Spanish, Romanian, Dutch, French and Chinese【中文】 so far...).

Download

cron-parser is available in the maven central repository, please select the latest version from there.

Usage Examples (Unit Tests)

See CronExpressionDescriptorTest

修改中文的CronParserI18N_zh.properties

使解析的Cron表达式符合国人使用习惯。

例:

cronExp = "0 0 2 1 * ? *";

原始解析结果为: 在上午2:00, 在当月的1日

现解析结果:每月1日上午2:00

具体可查看CronExpressionDescriptorZHTest文件。

若想使用原版,请访问原版git

About

Java Parser For Cron Expressions

Resources

License

Stars

Watchers

Forks

Packages

Contributors

Languages

  • Java 99.7%
  • Shell 0.3%

AltStyle によって変換されたページ (->オリジナル) /