英文:
Spring Integration @Scheduled alternative for cron expression with 7 fields and zone parameter
问题
@Scheduled不再接受7个字段。如果我需要cron表达式的年份字段,有哪些替代方法?我查看了Quartz的cron触发器使用7个字段,但不确定它是否适用于Spring Integration入站适配器?
英文:
@Scheduled doesn't take 7 fields anymore. What are the alternatives if I need the year field for the cron expression? I looked and saw Quartz cron trigger takes in 7 fields, but not sure if it'll work with spring integration inbound adapters?
答案1
得分: 0
你是对的:org.springframework.scheduling.support.CronTrigger
中没有年份字段支持。在 Spring Integration 的轮询器中也没有 Quartz 支持。但是你仍然可以配置 Quartz 调用你的方法来处理入站通道适配器并向通道产生消息。
更多信息请参阅这里:
https://docs.spring.io/spring-framework/reference/integration/scheduling.html#scheduling-quartz
https://github.com/spring-projects/spring-integration/issues/6705
英文:
You are right: there is no year field support in the org.springframework.scheduling.support.CronTrigger
. And there is no Quartz support in Spring Integation's poller. However you still can configure a Quartz to call your method for inbound channel adapter and produce a message to the channel.
See more info here:
https://docs.spring.io/spring-framework/reference/integration/scheduling.html#scheduling-quartz
https://github.com/spring-projects/spring-integration/issues/6705
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论