frankfurter/bin/schedule

19 lines
254 B
Plaintext
Raw Normal View History

#!/usr/bin/env ruby
# frozen_string_literal: true
2018-09-11 18:59:12 +02:00
`rake db:setup`
require 'rufus-scheduler'
scheduler = Rufus::Scheduler.new
2018-09-11 18:59:12 +02:00
trap 'INT' do
scheduler.shutdown
end
scheduler.cron '*/15 15,16,17 * * 1-5' do
`rake rates:current`
end
2018-09-11 18:59:12 +02:00
scheduler.join