Skip to content
This repository has been archived by the owner on Apr 4, 2018. It is now read-only.

Commit

Permalink
Bundle whenever for more expressive job description.
Browse files Browse the repository at this point in the history
author: @jthoenes
  • Loading branch information
Johannes Thoenes committed Sep 7, 2012
1 parent a97aa6d commit 2eb9ae6
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions config/schedule.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
def cron_command
root_path = File.expand_path(File.dirname(__FILE__) + "/../")
root_path = File.expand_path(File.dirname(__FILE__) + "/../")
set :output, {
:standard => "#{root_path}/log/cron.out.log",
:error => "#{root_path}/log/cron.err.log"
}
job_type :collector, "cd :path && RACK_ENV=:environment bundle exec bin/collector :task :output"

"cd #{root_path} && RACK_ENV=production bundle exec bin/collector broadcast" +
" >> #{root_path}/log/cron.out.log 2>> #{root_path}/log/cron.err.log"
end

every :hour do
command cron_command
collector "broadcast", :environment => 'production'
end

0 comments on commit 2eb9ae6

Please sign in to comment.