#@nestjs/schedule can't handle cron expression

5 messages · Page 1 of 1 (latest)

vocal knoll
#

I have the following cron:

someServiceMethod() { ... }```

However, I get the following error: `Field value (12) is out of range`

It's only for December, other months aren't throwing exceptions
hushed ginkgo
#

IIRC, cron month is zero based

#

Nope, I'm wrong about that

vocal knoll
#

Works if write explicitly Dec instead of 12

hushed ginkgo
#

It looks like if you leave off the first placement (the seconds) it'll default to 0 and treat all the values appropriately from there. Strange that 12 fails for week and 27 doesn't for month