diff --git a/backend/schema/metadatacronjob.go b/backend/schema/metadatacronjob.go index 6505e86251..d8f397fcf3 100644 --- a/backend/schema/metadatacronjob.go +++ b/backend/schema/metadatacronjob.go @@ -11,7 +11,7 @@ import ( type MetadataCronJob struct { Pos Position `parser:"" protobuf:"1,optional"` - Cron string `parser:"'+' 'cron' Whitespace @(' ' | ~EOL)*" protobuf:"2"` + Cron string `parser:"'+' 'cron' Whitespace @(' ' | ~EOL)+" protobuf:"2"` } var _ Metadata = (*MetadataCronJob)(nil) diff --git a/internal/cron/pattern.go b/internal/cron/pattern.go index 44a272a555..6d2e191751 100644 --- a/internal/cron/pattern.go +++ b/internal/cron/pattern.go @@ -40,7 +40,7 @@ var ( type Pattern struct { Duration *string `parser:"@(Number ('s' | 'm' | 'h'))"` DayOfWeek *DayOfWeek `parser:"| @('Mon' | 'Tue' | 'Wed' | 'Thu' | 'Fri' | 'Sat' | 'Sun')"` - Components []Component `parser:"| @@*"` + Components []Component `parser:"| @@+"` } func (p Pattern) String() string {