Quartz CronExpression 的编程接口?
Quartz 库中是否有提供编程的东西访问 CronExpression 中的字段?
如果我只能创建一个带有要解析的字符串而不是 getter 和 setter 的 CronExpression,这似乎很奇怪(而且很容易出错)
Is there something in the Quartz libraries that provides programmatic access to the fields in a CronExpression?
It seems odd (and rather error-prone) if I can only create a CronExpression with a string to parse instead of with getters and setters
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
老旧但值得回答。您可以查看 org.quartz.TriggerUtils 以获得一些编程支持关于这个话题。但如果仔细查看源代码,您会发现类似
trig.setCronExpression(String);
的内容。最后,石英人员会为您构建表达式。Old but worth to be answered. You may have a look at org.quartz.TriggerUtils to get some programatically support on this subject. But if you have a close look at the source, you will find something like
trig.setCronExpression(String);
. So finally, the quartzs guys do the expression building for you.