2020-03-28 16:49:40 +01:00
|
|
|
class AdministrateurActivateBeforeExpirationJob < CronJob
|
|
|
|
self.cron_expression = "0 8 * * *"
|
2018-04-05 12:36:29 +02:00
|
|
|
|
|
|
|
def perform(*args)
|
2019-08-09 16:04:28 +02:00
|
|
|
Administrateur
|
|
|
|
.includes(:user)
|
|
|
|
.inactive
|
|
|
|
.where(created_at: 3.days.ago.all_day)
|
|
|
|
.each { |a| a.user.remind_invitation! }
|
2018-04-05 12:36:29 +02:00
|
|
|
end
|
|
|
|
end
|