Author | Jakob Wakeling <[email protected]> |
Date | 2023-12-18 10:56:42 |
Commit | b43fa87f6b1f433cc0a2f518ef478cde2c7f8520 |
Parent | a9ee9eb8226084d4d0a2db1d597e93ad86fd9074 |
Fix removing all cron jobs after cron run
Diffstat
M | src/cron/cron.go | | | 3 | ++- |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cron/cron.go b/src/cron/cron.go index e9568f4..3fdf619 100644 --- a/src/cron/cron.go +++ b/src/cron/cron.go @@ -82,7 +82,8 @@ func (c *Cron) Start() { tmp := c.jobs[:0] for _, job := range c.jobs { if job.next.After(now) || job.next.IsZero() { - break + tmp = append(tmp, job) + continue } log.Println("[cron] running job", job.id, job.rid)