@Scheduled注解各参数详解

更新时间:2023-07-08 08:47:00 阅读: 评论:0

与 7. initialDelay 意思相同,只是使⽤字符串的形式。唯⼀不同的是⽀持占位符。
That's all ! Thanks for reading.
附:
截⾄spring-context-4.3.14.RELEASE的源码
/**
* An annotation that marks a method to be scheduled. Exactly one of
* the {@link #cron()}, {@link #fixedDelay()}, or {@link #fixedRate()}
* attributes must be specified.
*
* <p>The annotated method must expect no arguments. It will typically have
* a {@code void} return type; if not, the returned value will be ignored
* when called through the scheduler.
*
* <p>Processing of {@code @Scheduled} annotations is performed by
* registering a {@link ScheduledAnnotationBeanPostProcessor}. This can be
* done manually or, more conveniently, through the {@code <task:annotation-driven/>}
* element or @{@link EnableScheduling} annotation.
*
* <p>This annotation may be ud as a <em>meta-annotation</em> to create custom
* <em>compod annotations</em> with attribute overrides.
*
* @author Mark Fisher
中国风水大师
* @author Dave Syer小孩零食
* @author Chris Beams
* @since 3.0
* @e EnableScheduling
* @e ScheduledAnnotationBeanPostProcessor
* @e Schedules
*/
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented南瓜禁忌
@Repeatable(Schedules.class)
public @interface Scheduled {
/**
* A cron-like expression, extending the usual UN*X definition to include
* triggers on the cond as well as minute, hour, day of month, month
* and day of week.  e.g. {@code "0 * * * * MON-FRI"} means once per minute on
* weekdays (at the top of the minute - the 0th cond).
黑洞英语* @return an expression that can be pard to a cron schedule
* @e org.springframework.scheduling.support.CronSequenceGenerator水疗按摩
*/
String cron() default "";
/**
* A time zone for which the cron expression will be resolved. By default, this我的一家作文
* attribute is the empty String (i.e. the rver's local time zone will be ud).
* @return a zone id accepted by {@link java.util.TimeZone#getTimeZone(String)},茼蒿拼音
招商加盟广告宣传* or an empty String to indicate the rver's default time zone
* @since 4.0
* @e org.springframework.scheduling.support.CronTrigger#CronTrigger(String, java.util.TimeZone)    * @e java.util.TimeZone
*/
String zone() default "";
/**
* Execute the annotated method with a fixed period in milliconds between the
* end of the last invocation and the start of the next.
* @return the delay in milliconds
*/
long fixedDelay() default -1;
/**
* Execute the annotated method with a fixed period in milliconds between the

本文发布于:2023-07-08 08:47:00,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/1085159.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:风水   形式   零食   禁忌
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图