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.
orbit-4-1/app/jobs/nccu_calendar.rb

13 lines
326 B
Ruby

class NccuCalendar
require 'open-uri'
@queue = :high
def self.perform()
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"
end
end