Cron Jobs Error with never run tasks

Getting the below error when trying to access Cron Job from a namespace that has crons set to: * * 31 2 *

at W (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:1961008)
at cell (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:7871495)
at div
at div
at ee (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:7866797)
at div
at div
at https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:6456977
at Me (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:7870817)
at https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:1960563
at div
at re (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:7844811)
at y (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:4951951)
at div
at le (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:5041757)
at y (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:4951951)
at div
at dt (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:5055932)
at y (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:4951951)
at Z (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:5459196)
at y (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:4951951)
at Q (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:4669767)
at main
at div
at https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:1960563
at https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:1960563
at y (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:4951951)
at https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:1960563
at Suspense
at https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:4954274
at Q (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:4669767)
at div
at https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:1960563
at Suspense
at kde
at W (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:1961008)
at Q (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:4669767)
at https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:1960563
at y (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:4951951)
at W (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:1961008)
at https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:1960563
at y (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:4951951)
at we (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:9211352)
at Object.apply (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:7908023)
at A (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:6670427)
at Object.apply (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:7908023)
at div
at Le (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:5075880)
at Object.apply (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:7908023)
at https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:1960563
at Object.apply (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:7908023)
at Suspense
at https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:4954274
at div
at div
at de
at div
at W (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:5070201)
at div
at https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:1960563
at Suspense
at https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:4954274
at Q (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:4669767)
at div
at div
at div
at div
at W (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:5070201)
at https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:1960563
at Q (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:4669767)
at W (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:1961008)
at main
at div
at L (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:7699638)
at W (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:1961008)
at L (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:701953)
at y (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:4951951)
at W (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:1961008)
at https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:1960563
at y (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:4951951)
at we (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:9211352)
at Object.apply (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:7908023)
at A (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:6670427)
at Object.apply (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:7908023)
at div
at Le (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:5075880)
at We (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:5075589)
at Object.apply (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:7908023)
at https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:1960563

Error stack:

Error: Invalid explicit day of month definition
at new CronFieldCollection (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:474975)
at CronExpressionParser.parse (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:470558)
at https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:3678182
at Object.apply (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:7908023)
at renderTableContents (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:1086203)
at renderTableContents (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:5461987)
at le.getTableCells (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:5042703)
at children (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:2:5043376)
at https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:1959599
at It (https://lens.app:65190/build/lens.js?4d10baa3cd01f0041efa:8:2015263)

Hi @alarsen11

Thanks for reporting this, and great catch!

The issue is related to the cron expression * * 31 2 *, which refers to a nonexistent date — February 31st. Some cron parsing libraries (including the one we’re using) attempt to validate the expression and throw an error when it doesn’t match a real date.

While Kubernetes itself accepts such expressions without complaint (it simply skips those dates), our frontend currently doesn’t handle this gracefully and ends up crashing or failing to load the Cron Jobs.

The good news is: we’re already working on a fix

Thanks again for the heads-up — really appreciated!

1 Like