Created
April 4, 2013 23:44
-
-
Save JKring/5315396 to your computer and use it in GitHub Desktop.
This file contains 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
# i'm almost certain that if you refactored this | |
every 1.day, :at => '4:30 am' do | |
if DateTime.now.end_of_month == DateTime.now | |
rake "cull_payments" | |
end | |
end | |
every 1.day, :at => '4:30 am' do | |
if DateTime.now.day == 15 | |
rake "cull_payments" | |
end | |
end | |
# into this | |
every 1.day, :at => '4:30 am' do | |
if DateTime.now.end_of_month == DateTime.now || DateTime.now.day == 15 | |
rake "cull_payments" | |
end | |
end | |
# it would behave the same way |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment