move all the cron jobs in a dedicated directory

This commit is contained in:
clemkeirua 2020-11-13 14:34:53 +01:00 committed by LeSim (Rebase PR Action)
parent 977736e5d4
commit 513d4f6ff1
23 changed files with 34 additions and 34 deletions

View file

@ -0,0 +1,10 @@
class Cron::DiscardedProceduresDeletionJob < Cron::CronJob
self.schedule_expression = "every day at 1 am"
def perform(*args)
Procedure.discarded_expired.find_each do |procedure|
procedure.dossiers.with_discarded.destroy_all
procedure.destroy
end
end
end