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

12 lines
355 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class Cron::PurgeManagerAdministrateurSessionsJob < Cron::CronJob
2024-06-13 16:40:08 +02:00
self.schedule_expression = "every day at 02:45"
def perform
# TODO: add id column to administrateurs_procedures and use destroy_all
AdministrateursProcedure.where(manager: true).delete_all
AssignTo.where(manager: true).destroy_all
end
end