Created
February 16, 2012 06:47
-
-
Save nambrot/1842743 to your computer and use it in GitHub Desktop.
app/clock.rb
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
require 'clockwork' | |
include Clockwork | |
require File.expand_path('../../config/boot', __FILE__) | |
require File.expand_path('../../config/environment', __FILE__) | |
every(2.hours, 'feeds.refresh') { Delayed::Job.enqueue CollegeJob.new } | |
class CollegeJob < Object | |
def perform | |
College.all.each {|d| College.getPhotos(d)} | |
end | |
end |
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
require 'clockwork' | |
include Clockwork | |
require File.expand_path('../../config/boot', __FILE__) | |
require File.expand_path('../../config/environment', __FILE__) | |
every(2.hours, 'feeds.refresh') { Delayed::Job.enqueue CollegeJob.new } | |
class CollegeJob < Object | |
def perform | |
College.all.each {|d| College.getPhotos(d)} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment