From 9e83a13c1499a2d02f050371e1ffb4862e3037a8 Mon Sep 17 00:00:00 2001 From: Rodrigo Broggi Date: Thu, 20 Jun 2024 20:56:48 +0200 Subject: [PATCH] issue-738: make withSeconds optional in cron-expression (#739) --- job.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/job.go b/job.go index c3a3e1f6..e853d795 100644 --- a/job.go +++ b/job.go @@ -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)