添加job任务

This commit is contained in:
huang 2015-09-10 09:06:00 +08:00
parent 3db692dc39
commit 6b0432c04c
1 changed files with 8 additions and 0 deletions

View File

@ -202,5 +202,13 @@ END_DESC
Mailer.run.send_for_user_activities(user, Date.today, 1)
end
end
desc "send a message for Job deadline"
task :message => :environment do
users = User.where(mail_notification: 'day')
users.each do |user|
Mailer.run.send_for_user_activities(user, Date.today, 1)
end
end
end
end