Skip to content

Instantly share code, notes, and snippets.

@JKring
Created April 4, 2013 23:44
Show Gist options
  • Save JKring/5315396 to your computer and use it in GitHub Desktop.
Save JKring/5315396 to your computer and use it in GitHub Desktop.
# 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