Created
February 6, 2011 01:44
-
-
Save gertig/813019 to your computer and use it in GitHub Desktop.
Rails 3 demo of using HTTParty and Moment for delayed jobs
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
#lib/tasks/cron.rake | |
desc "This task is called by the Heroku cron add-on" | |
task :cron => :environment do | |
if Time.now.hour == 0 # run at midnight | |
Person.create_schedule | |
puts "Finished running my first CRON task" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment