issue-738: make withSeconds optional in cron-expression (#739)

This commit is contained in:
Rodrigo Broggi 2024-06-20 20:56:48 +02:00 committed by GitHub
parent 399ac2807b
commit 9e83a13c14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

2
job.go
View File

@ -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)