parent
ca7ead191e
commit
5440965260
|
@ -0,0 +1,3 @@
|
||||||
|
```release-note:bug
|
||||||
|
api: Fixed a nil pointer dereference when periodic jobs are missing their periodic spec
|
||||||
|
```
|
|
@ -822,7 +822,7 @@ func (p *PeriodicConfig) Canonicalize() {
|
||||||
// returned. The `time.Location` of the returned value matches that of the
|
// returned. The `time.Location` of the returned value matches that of the
|
||||||
// passed time.
|
// passed time.
|
||||||
func (p *PeriodicConfig) Next(fromTime time.Time) (time.Time, error) {
|
func (p *PeriodicConfig) Next(fromTime time.Time) (time.Time, error) {
|
||||||
if *p.SpecType == PeriodicSpecCron {
|
if p != nil && *p.SpecType == PeriodicSpecCron {
|
||||||
e, err := cronexpr.Parse(*p.Spec)
|
e, err := cronexpr.Parse(*p.Spec)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return time.Time{}, fmt.Errorf("failed parsing cron expression %q: %v", *p.Spec, err)
|
return time.Time{}, fmt.Errorf("failed parsing cron expression %q: %v", *p.Spec, err)
|
||||||
|
|
Loading…
Reference in New Issue