Commit eebd25df by Tran Hoang Viet

VietTH: Add rake update_price to crontab

parent 2f3c0762
......@@ -5,6 +5,7 @@ require 'capistrano/bundler'
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
require 'capistrano3/unicorn'
require 'whenever/capistrano'
# Load custom tasks from `lib/capistrano/tasks' if you have any defined
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
\ No newline at end of file
source 'http://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.3'
# Use mysql as the database for Active Record
......@@ -76,6 +74,7 @@ gem 'mini_magick', '~> 3.8.1'
# Background job
gem 'sidekiq', '~> 3.4.1'
gem 'whenever', '~> 0.9.4'
# pagination
gem 'kaminari', '~> 0.16.3'
......
......@@ -75,6 +75,7 @@ GEM
redis
celluloid (0.16.0)
timers (~> 4.0.0)
chronic (0.10.2)
coderay (1.1.0)
coffee-rails (4.1.0)
coffee-script (>= 2.2.0)
......@@ -321,6 +322,8 @@ GEM
binding_of_caller (>= 0.7.2)
railties (>= 4.0)
sprockets-rails (>= 2.0, < 4.0)
whenever (0.9.4)
chronic (>= 0.6.3)
PLATFORMS
ruby
......@@ -372,6 +375,7 @@ DEPENDENCIES
unicorn
vacuum (~> 1.3.0)
web-console (~> 2.0)
whenever (~> 0.9.4)
BUNDLED WITH
1.10.5
......@@ -21,6 +21,8 @@ set :linked_dirs, fetch(:linked_dirs, []).push(
'public/uploads'
)
set :whenever_identifier, ->{ fetch(:rails_env) }
after 'deploy:publishing', 'deploy:restart'
namespace :deploy do
......
# Use this file to easily define all of your cron jobs.
#
# It's helpful, but not entirely necessary to understand cron before proceeding.
# http://en.wikipedia.org/wiki/Cron
# Example:
#
# set :output, "/path/to/my/cron_log.log"
#
# every 2.hours do
# command "/usr/bin/some_great_command"
# runner "MyModel.some_method"
# rake "some:great:rake:task"
# end
#
# every 4.days do
# runner "AnotherModel.prune_old_records"
# end
# Learn more: http://github.com/javan/whenever
every :hour do
rake "aws:update_price"
end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment