Skip to content

Commit

Permalink
issue-738: make withSeconds optional in cron-expression (#739)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbroggi authored Jun 20, 2024
1 parent 399ac28 commit 9e83a13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion job.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (c cronJobDefinition) setup(j *internalJob, location *time.Location) error
)

if c.withSeconds {
p := cron.NewParser(cron.Second | cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow | cron.Descriptor)
p := cron.NewParser(cron.SecondOptional | cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow | cron.Descriptor)
cronSchedule, err = p.Parse(withLocation)
} else {
cronSchedule, err = cron.ParseStandard(withLocation)
Expand Down

0 comments on commit 9e83a13

Please sign in to comment.