Class: Cron
Handles Cron strings and generates dates based on the cron string provided.
See
https://en.wikipedia.org/wiki/Cron
Constructors
constructor
• new Cron(cron
)
Parameters
Name | Type | Description |
---|---|---|
cron | string | The cron pattern to use |
Defined in
node_modules/@sapphire/cron/dist/index.d.mts:62
Properties
cron
• cron: string
Defined in
node_modules/@sapphire/cron/dist/index.d.mts:52
days
• days: number
[]
Defined in
node_modules/@sapphire/cron/dist/index.d.mts:56
dows
• dows: number
[]
Defined in
node_modules/@sapphire/cron/dist/index.d.mts:58
hours
• hours: number
[]
Defined in
node_modules/@sapphire/cron/dist/index.d.mts:55
minutes
• minutes: number
[]
Defined in
node_modules/@sapphire/cron/dist/index.d.mts:54
months
• months: number
[]
Defined in
node_modules/@sapphire/cron/dist/index.d.mts:57
normalized
• normalized: string
Defined in
node_modules/@sapphire/cron/dist/index.d.mts:53
normalize
▪ Private
Static
normalize: any
Normalize the pattern
Param
The pattern to normalize
Defined in
node_modules/@sapphire/cron/dist/index.d.mts:73
parsePart
▪ Private
Static
parsePart: any
Parse the current part
Param
The part of the pattern to parse
Param
The id that identifies the current part
Defined in
node_modules/@sapphire/cron/dist/index.d.mts:84
parseString
▪ Private
Static
parseString: any
Parse the pattern
Param
The pattern to parse
Defined in
node_modules/@sapphire/cron/dist/index.d.mts:78
Methods
next
▸ next(outset?
, origin?
): Date
Get the next date that matches with the current pattern
Parameters
Name | Type | Description |
---|---|---|
outset? | Date | The Date instance to compare with |
origin? | boolean | Whether this next call is origin |
Returns
Defined in
node_modules/@sapphire/cron/dist/index.d.mts:68