frankfurter/bin/schedule
Hakan Ensari cfbb4ac4ac Repack app
I'm moving my company's server to a private location now that I have sold the domain. While prepping for this, I've done some cleanup and also threw in changes I had lingering on my hard drive.

- Run a single database query instead of two
- Fold the gem into the app and use Ox instead of REXML
- Simplify error handling logic
- Relax throttling
2018-03-08 23:51:36 +00:00

13 lines
240 B
Ruby
Executable File

#!/usr/bin/env ruby
# frozen_string_literal: true
system 'rake db:setup'
require 'rufus-scheduler'
scheduler = Rufus::Scheduler.new
scheduler.cron '*/15 15,16,17 * * 1-5', timeout: '1m' do
system 'rake rates:update'
end
scheduler.join