Class: Cron
Defined in: cron/dist/esm/index.d.mts:51
Handles Cron strings and generates dates based on the cron string provided.
See
https://en.wikipedia.org/wiki/Cron
Constructors
Constructor
new Cron(
cron:string):Cron
Defined in: cron/dist/esm/index.d.mts:62
Parameters
| Parameter | Type | Description | 
|---|---|---|
| cron | string | The cron pattern to use | 
Returns
Cron
Properties
cron
cron:
string
Defined in: cron/dist/esm/index.d.mts:52
days
days:
number[]
Defined in: cron/dist/esm/index.d.mts:56
dows
dows:
number[]
Defined in: cron/dist/esm/index.d.mts:58
hours
hours:
number[]
Defined in: cron/dist/esm/index.d.mts:55
minutes
minutes:
number[]
Defined in: cron/dist/esm/index.d.mts:54
months
months:
number[]
Defined in: cron/dist/esm/index.d.mts:57
normalized
normalized:
string
Defined in: cron/dist/esm/index.d.mts:53
normalize
privatestaticnormalize:any
Defined in: cron/dist/esm/index.d.mts:79
Normalize the pattern
Param
The pattern to normalize
parsePart
privatestaticparsePart:any
Defined in: cron/dist/esm/index.d.mts:90
Parse the current part
Param
The part of the pattern to parse
Param
The id that identifies the current part
parseString
privatestaticparseString:any
Defined in: cron/dist/esm/index.d.mts:84
Parse the pattern
Param
The pattern to parse
Methods
next()
Defined in: cron/dist/esm/index.d.mts:68
Get the next date that matches with the current pattern
Parameters
| Parameter | Type | Description | 
|---|---|---|
| outset? | Date | The Date instance to compare with | 
| origin? | boolean | Whether this next call is origin | 
Returns
toString()
toString():
string
Defined in: cron/dist/esm/index.d.mts:74
Returns the string that represents this cron pattern
Returns
string
The string that represents this cron pattern