org.springframework.scheduling.annotation

## Annotation Type Scheduled

-     @Target(value={METHOD,ANNOTATION_TYPE})
      @Retention(value=RUNTIME)
      @Documented
      public @interface Scheduled

  Annotation that marks a method to be scheduled. Exactly one of the `cron()`, `fixedDelay()`, or `fixedRate()` attributes must be specified.

  The annotated method must expect no arguments and have a `void` return type.

  Processing of `@Scheduled` annotations is performed by registering a `ScheduledAnnotationBeanPostProcessor`. This can be done manually or, more conveniently, through the `<task:annotation-driven/>` element or @`EnableScheduling` annotation.

  Since:
    3.0
  Author:
    Mark Fisher, Dave Syer, Chris Beams
  See Also:
    `EnableScheduling`, `ScheduledAnnotationBeanPostProcessor`

- - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `String` | `cron` A cron-like expression, extending the usual UN*X definition to include triggers on the second as well as minute, hour, day of month, month and day of week.
    `long` | `fixedDelay` Execute the annotated method with a fixed period between the end of the last invocation and the start of the next.
    `long` | `fixedRate` Execute the annotated method with a fixed period between invocations.
    `long` | `initialDelay` Number of milliseconds to delay before the first execution of a `fixedRate()` or `fixedDelay()` task.

- - ### Element Detail

    - #### cron

          public abstract String cron

      A cron-like expression, extending the usual UN*X definition to include triggers on the second as well as minute, hour, day of month, month and day of week. e.g. `"0 * * * * MON-FRI"` means once per minute on weekdays (at the top of the minute - the 0th second).
      Returns:
        an expression that can be parsed to a cron schedule
      See Also:
        `CronSequenceGenerator`
      Default:
        ""

    - #### fixedDelay

          public abstract long fixedDelay

      Execute the annotated method with a fixed period between the end of the last invocation and the start of the next.
      Returns:
        the delay in milliseconds
      Default:
        -1L

    - #### fixedRate

          public abstract long fixedRate

      Execute the annotated method with a fixed period between invocations.
      Returns:
        the period in milliseconds
      Default:
        -1L

    - #### initialDelay

          public abstract long initialDelay

      Number of milliseconds to delay before the first execution of a `fixedRate()` or `fixedDelay()` task.
      Returns:
        the initial delay in milliseconds
      Since:
        3.2
      Default:
        0L