You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
334 B
16 lines
334 B
#coding=utf-8
|
|
|
|
|
|
## 移入crontab
|
|
|
|
# scheduler = Rufus::Scheduler.new
|
|
#
|
|
# #每天18:00发送当天的邮件汇总
|
|
# scheduler.cron('0 18 * * *') do
|
|
# users = User.where(mail_notification: 'day')
|
|
# users.each do |user|
|
|
# mailer = Mailer.send_for_user_activities(user, Date.today, 1)
|
|
# mailer.deliver if mailer
|
|
# end
|
|
# end
|