org.springframework.scheduling.support

## 类 CronSequenceGenerator

- java.lang.Object
- - org.springframework.scheduling.support.CronSequenceGenerator

-     public class CronSequenceGenerator
      extends Object

  Date sequence generator for a Crontab pattern, allowing clients to specify a pattern that the sequence matches.

  The pattern is a list of six single space-separated fields: representing second, minute, hour, day, month, weekday. Month and weekday names can be given as the first three letters of the English names.

  Example patterns:

  - "0 0 * * * *" = the top of every hour of every day.
  - "*/10 * * * * *" = every ten seconds.
  - "0 0 8-10 * * *" = 8, 9 and 10 o'clock of every day.
  - "0 0 6,19 * * *" = 6:00 AM and 7:00 PM every day.
  - "0 0/30 8-10 * * *" = 8:00, 8:30, 9:00, 9:30, 10:00 and 10:30 every day.
  - "0 0 9-17 * * MON-FRI" = on the hour nine-to-five weekdays
  - "0 0 0 25 12 ?" = every Christmas Day at midnight
  从以下版本开始:
    3.0
  作者:
    Dave Syer, Juergen Hoeller, Ruslan Sibgatullin
  另请参阅:
    `CronTrigger`

- - ### 构造器概要

    构造器
    构造器和说明
    `CronSequenceGenerator(String expression)` Construct a `CronSequenceGenerator` from the pattern provided, using the default `TimeZone`.
    `CronSequenceGenerator(String expression, TimeZone timeZone)` Construct a `CronSequenceGenerator` from the pattern provided, using the specified `TimeZone`.

  - ### 方法概要

    所有方法 静态方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `boolean` | `equals(Object other)`
    `int` | `hashCode()`
    `static boolean` | `isValidExpression(String expression)` Determine whether the specified expression represents a valid cron pattern.
    `Date` | `next(Date date)` Get the next `Date` in the sequence matching the Cron pattern and after the value provided.
    `String` | `toString()`

    - ### 从类继承的方法 java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### 构造器详细资料

    - #### CronSequenceGenerator

          public CronSequenceGenerator(String expression)

      Construct a `CronSequenceGenerator` from the pattern provided, using the default `TimeZone`.
      参数:
        `expression` - a space-separated list of time fields
      抛出:
        `IllegalArgumentException` - if the pattern cannot be parsed
      另请参阅:
        `TimeZone.getDefault()`

    - #### CronSequenceGenerator

          public CronSequenceGenerator(String expression,
                                       TimeZone timeZone)

      Construct a `CronSequenceGenerator` from the pattern provided, using the specified `TimeZone`.
      参数:
        `expression` - a space-separated list of time fields
        `timeZone` - the TimeZone to use for generated trigger times
      抛出:
        `IllegalArgumentException` - if the pattern cannot be parsed

  - ### 方法详细资料

    - #### next

          public Date next(Date date)

      Get the next `Date` in the sequence matching the Cron pattern and after the value provided. The return value will have a whole number of seconds, and will be after the input value.
      参数:
        `date` - a seed value
      返回:
        the next value matching the pattern

    - #### isValidExpression

          public static boolean isValidExpression(@Nullable
                                                  String expression)

      Determine whether the specified expression represents a valid cron pattern.
      参数:
        `expression` - the expression to evaluate
      返回:
        `true` if the given expression is a valid cron expression
      从以下版本开始:
        4.3

    - #### equals

          public boolean equals(Object other)

      覆盖:
        `equals` 在类中 `Object`

    - #### hashCode

          public int hashCode()

      覆盖:
        `hashCode` 在类中 `Object`

    - #### toString

          public String toString()

      覆盖:
        `toString` 在类中 `Object`