diff --git a/services/cron/tasks_extended.go b/services/cron/tasks_extended.go index 2d1bf532342b..ec7ced99e9bc 100644 --- a/services/cron/tasks_extended.go +++ b/services/cron/tasks_extended.go @@ -26,7 +26,7 @@ func registerDeleteInactiveUsers() { RunAtStart: false, Schedule: "@annually", }, - OlderThan: 0 * time.Second, + OlderThan: time.Minute * time.Duration(setting.Service.ActiveCodeLives), }, func(ctx context.Context, _ *user_model.User, config Config) error { olderThanConfig := config.(*OlderThanConfig) return user_service.DeleteInactiveUsers(ctx, olderThanConfig.OlderThan)