Parse/evaluate/generate CrontabExpressions outside of linux?

前端 未结 2 935
清歌不尽
清歌不尽 2021-01-16 10:43

I\'m building some software that needs a scheduling input, and I\'d really like to re-use the design of crontab because it simply works.

CrontabExpressions can be re

2条回答
  •  无人共我
    2021-01-16 11:23

    There is a Java library as part of the Quartz Scheduler which can be used to evaluate cron expressions quite easily.

    The class CronExpression yields methods like isSatisfiedBy(Date date) or getNextValidTimeAfter(Date date) which is very useful.

    The library is freely available.

提交回复
热议问题