orbit-basic/app/jobs/fetch_time.rb

14 lines
323 B
Ruby
Raw Normal View History

2012-05-07 02:23:16 +00:00
# require 'open-uri'
# require 'nokogiri'
2012-04-13 04:10:47 +00:00
module FetchTime
2012-05-07 02:23:16 +00:00
@queue = :my_job_queue
2012-04-13 04:10:47 +00:00
def self.perform()
2012-05-07 02:23:16 +00:00
# sleep 10
# doc = Nokogiri::HTML(open('http://www.timeanddate.com/worldclock/city.html?n=241'))
# CronMail.time_check(doc.at('#ct').children.first.text).deliver
# puts "Mail Sent"
# true
2012-04-13 04:10:47 +00:00
end
end