Annotation Interface CronTrigger


@Target({TYPE,ANNOTATION_TYPE}) @Retention(RUNTIME) @Documented @Reflective public @interface CronTrigger
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    A cron-like expression, extending the usual UN*X definition to include triggers on the second, minute, hour, day of month, month, and day of week.
    long
    the delay time between the cron triggers
    A unique id for this trigger which is optional, by default the cron expression or the delay is used.
    the unit of the fixed delay
  • Element Details

    • id

      String id
      A unique id for this trigger which is optional, by default the cron expression or the delay is used.
      Default:
      ""
    • cron

      String cron
      A cron-like expression, extending the usual UN*X definition to include triggers on the second, minute, hour, day of month, month, and day of week.

      For example, "0 * * * * MON-FRI" means once per minute on weekdays (at the top of the minute - the 0th second).

      The fields read from left to right are interpreted as follows.
      • second
      • minute
      • hour
      • day of month
      • month
      • day of week
      Returns:
      an expression that can be parsed to a cron schedule
      See Also:
      • CronExpression.parse(String)
      Default:
      ""
    • fixedDelay

      long fixedDelay
      the delay time between the cron triggers
      Default:
      -1L
    • timeUnit

      TimeUnit timeUnit
      the unit of the fixed delay
      Default:
      MILLISECONDS