Class CronSecond

Represents the "second" field within a cron expression. CronSecond

Hierarchy (View Summary)

Constructors

  • CronSecond constructor. Initializes the "second" field with the provided values.

    Parameters

    • values: (
          | 0
          | 1
          | 2
          | 3
          | 4
          | 5
          | 6
          | 7
          | 8
          | 9
          | 10
          | 11
          | 12
          | 13
          | 14
          | 15
          | 16
          | 17
          | 18
          | 19
          | 20
          | 21
          | 22
          | 23
          | 24
          | 25
          | 26
          | 27
          | 28
          | 29
          | 30
          | 31
          | 32
          | 33
          | 34
          | 35
          | 36
          | 37
          | 38
          | 39
          | 40
          | 41
          | 42
          | 43
          | 44
          | 45
          | 46
          | 47
          | 48
          | 49
          | 50
          | 51
          | 52
          | 53
          | 54
          | 55
          | 56
          | 57
          | 58
          | 59
      )[]

      Values for the "second" field

    • Optionalwildcard: boolean = false

      Whether this field is a wildcard

    Returns CronSecond

Accessors

  • get chars(): readonly string[]
  • Returns an array of allowed special characters for this field.

    Returns readonly string[]

  • get isWildcard(): boolean
  • Indicates whether this field is a wildcard.

    Returns boolean

  • get max(): number
  • Returns the maximum value allowed for this field.

    Returns number

  • get min(): number
  • Returns the minimum value allowed for this field.

    Returns number

  • get values(): (
        | 0
        | 1
        | 2
        | 3
        | 4
        | 5
        | 6
        | 7
        | 8
        | 9
        | 10
        | 11
        | 12
        | 13
        | 14
        | 15
        | 16
        | 17
        | 18
        | 19
        | 20
        | 21
        | 22
        | 23
        | 24
        | 25
        | 26
        | 27
        | 28
        | 29
        | 30
        | 31
        | 32
        | 33
        | 34
        | 35
        | 36
        | 37
        | 38
        | 39
        | 40
        | 41
        | 42
        | 43
        | 44
        | 45
        | 46
        | 47
        | 48
        | 49
        | 50
        | 51
        | 52
        | 53
        | 54
        | 55
        | 56
        | 57
        | 58
        | 59
    )[]
  • Returns an array of allowed values for the "second" field.

    Returns (
        | 0
        | 1
        | 2
        | 3
        | 4
        | 5
        | 6
        | 7
        | 8
        | 9
        | 10
        | 11
        | 12
        | 13
        | 14
        | 15
        | 16
        | 17
        | 18
        | 19
        | 20
        | 21
        | 22
        | 23
        | 24
        | 25
        | 26
        | 27
        | 28
        | 29
        | 30
        | 31
        | 32
        | 33
        | 34
        | 35
        | 36
        | 37
        | 38
        | 39
        | 40
        | 41
        | 42
        | 43
        | 44
        | 45
        | 46
        | 47
        | 48
        | 49
        | 50
        | 51
        | 52
        | 53
        | 54
        | 55
        | 56
        | 57
        | 58
        | 59
    )[]

  • get validChars(): RegExp
  • Returns the regular expression used to validate this field.

    Returns RegExp

Methods

  • Helper function to sort values in ascending order.

    Parameters

    • a: string | number

      First value to compare

    • b: string | number

      Second value to compare

    Returns number

    • A negative, zero, or positive value, depending on the sort order