demarches-normaliennes/app/jobs/cron/purge_old_email_event_job.rb
2024-08-22 09:26:48 +02:00

9 lines
203 B
Ruby

# frozen_string_literal: true
class Cron::PurgeOldEmailEventJob < Cron::CronJob
self.schedule_expression = "every week at 3:00"
def perform
EmailEvent.outdated.in_batches.destroy_all
end
end