This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
2012-05-08 03:31:35 +00:00
|
|
|
class NccuCalendar
|
2012-05-08 08:08:41 +00:00
|
|
|
require 'open-uri'
|
2012-05-08 03:31:35 +00:00
|
|
|
@queue = :high
|
|
|
|
|
|
|
|
def self.perform()
|
2012-05-08 08:08:41 +00:00
|
|
|
File.open(File.join(Rails.root, 'public/static', 'nccu_calendar.rss'),'w') do |file|
|
|
|
|
file << open('http://events.nccu.edu.tw/Feed').read
|
|
|
|
CronMail.time_check("NCCU Calendar synced").deliver
|
|
|
|
end
|
|
|
|
puts "NccuCalendar Synced"
|
2012-05-08 03:31:35 +00:00
|
|
|
end
|
|
|
|
end
|