demarches-normaliennes/app/jobs/cron/purge_old_email_event_job.rb
2023-03-08 15:31:10 +01:00

7 lines
172 B
Ruby

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