diff --git a/pkg/cron/service.go b/pkg/cron/service.go index 55dd742a4..d38009306 100644 --- a/pkg/cron/service.go +++ b/pkg/cron/service.go @@ -300,7 +300,6 @@ func (cs *CronService) executeJobByID(jobID string) { func (cs *CronService) computeNextRun(schedule *CronSchedule, nowMS int64) *int64 { switch schedule.Kind { - case "at": if schedule.AtMS != nil && *schedule.AtMS > nowMS { return schedule.AtMS @@ -331,7 +330,6 @@ func (cs *CronService) computeNextRun(schedule *CronSchedule, nowMS int64) *int6 log.Printf("[cron] unknown schedule kind '%s'", schedule.Kind) return nil } - } func (cs *CronService) recomputeNextRuns() { diff --git a/pkg/cron/service_test.go b/pkg/cron/service_test.go index a026d2c6b..c5cf288ac 100644 --- a/pkg/cron/service_test.go +++ b/pkg/cron/service_test.go @@ -186,7 +186,7 @@ func TestCronService_PersistenceIntegrity(t *testing.T) { } // test loading invalid JSON - os.WriteFile(tmpFile, []byte("{invalid json}"), 0644) + os.WriteFile(tmpFile, []byte("{invalid json}"), 0o644) cs3 := NewCronService(tmpFile, nil) err := cs3.loadStore() if err == nil {