Created
November 28, 2010 17:42
-
-
Save RogerPodacter/719123 to your computer and use it in GitHub Desktop.
cron.rake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is all in cron.rake (I have the hourly cron add-on) | |
| if Time.zone.now.hour == 0 | |
| User.send_later(:send_daily_leaderboard_email) # do this once per day | |
| if Time.zone.now.strftime("%w").to_i == 0 | |
| ReportMailer.send_later(:deliver_manager_activity_report, 1.week.ago) # do this once per week | |
| end | |
| if Time.zone.now.strftime("%e").to_i == 1 | |
| ReportMailer.send_later(:deliver_manager_activity_report, 1.month.ago) # do this once per month | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment