diff --git a/Gemfile b/Gemfile index 7c8fdaa..012f7f2 100644 --- a/Gemfile +++ b/Gemfile @@ -12,4 +12,5 @@ gem 'chartkick' gem 'rerun' gem 'sqlite3' gem 'rake' -gem 'puma' \ No newline at end of file +gem 'puma'gem 'whenever', require: false + diff --git a/config/schedule.rb b/config/schedule.rb new file mode 100644 index 0000000..c78bd47 --- /dev/null +++ b/config/schedule.rb @@ -0,0 +1,10 @@ +set :environment, ENV["RACK_ENV"] +set :output, '/var/log/cron.log' + +ENV.each_key do |key| + env key.to_sym, ENV[key] +end + +every 5.minutes do + rake "rate:save" +end \ No newline at end of file