Skip to content

Instantly share code, notes, and snippets.

@1c7
Created November 2, 2017 09:43
Show Gist options
  • Select an option

  • Save 1c7/a7902851c12f8d270372c2c9c9b9ff73 to your computer and use it in GitHub Desktop.

Select an option

Save 1c7/a7902851c12f8d270372c2c9c9b9ff73 to your computer and use it in GitHub Desktop.
this one work for me! 2017!
set :path, "/var/www/yuzhu/current"
set :bundle_path, "/usr/local/bin/bundle"
set :rails_path, "/usr/local/bin/rails"
set :output, {:error => "/var/www/random_log/cron_error_log.log", :standard => "/var/www/random_log/cron_log.log"}
job_type :my_rails, 'cd :path && :bundle_path exec :rails_path runner -e production :task :output'
every 3.hours do
my_rails "Location.cal_score"
my_rails "Location.cal_price"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment