Created
December 25, 2020 10:26
-
-
Save Samda/ebd19aeede1883ac7494b5b551a51a3c to your computer and use it in GitHub Desktop.
Rails 6 and whenever with rbenv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :output, "#{path}/log/cron.log" | |
set :env_path, '"$HOME/.rbenv/shims":"$HOME/.rbenv/bin"' | |
job_type :rails, %q{ cd :path && PATH=:env_path:"$PATH" RAILS_ENV=:environment bundle exec rails :task --silent :output } | |
job_type :runner, %q{ cd :path && PATH=:env_path:"$PATH" bin/rails runner -e :environment ':task' :output } | |
job_type :script, %q{ cd :path && PATH=:env_path:"$PATH" RAILS_ENV=:environment bundle exec bin/:task :output } | |
every 1.minute do | |
rails 'message:send_to_clients' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment