demarches-normaliennes/app/jobs/cron/discarded_dossiers_deletion_job.rb

8 lines
248 B
Ruby

class Cron::DiscardedDossiersDeletionJob < Cron::CronJob
self.schedule_expression = "every day at 2 am"
def perform(*args)
Dossier.discarded_brouillon_expired.destroy_all
Dossier.discarded_en_construction_expired.destroy_all
end
end