Sha256: 69991f68ec43809a537907b896707ebce3f684b81af28715424abcb64c57b2fe

Contents?: true

Size: 474 Bytes

Versions: 2

Compression:

Stored size: 474 Bytes

Contents

#!/usr/bin/env ruby

# For running jobs through cron - only prints output if there is an error
#
# author mconway
# since 8/12/07

RAILS_ROOT = File.expand_path("..", File.dirname(__FILE__))
log = "#{RAILS_ROOT}/log/cron-runner-#{Time.now.tv_sec}.log"
begin
  ident = File.basename(ARGV[-1]).gsub(/\W+/, "_")
  log = "#{RAILS_ROOT}/log/cron-runner-#{ident}.log"
rescue
end

Dir.chdir(RAILS_ROOT)
args = %W{-e -l #{log} -- rails runner} + ARGV
system "script/cron-sh", *args

Version data entries

2 entries across 1 versions & 1 rubygems

Version Path
nirvdrum-rubber-2.0.0.rails3.beta6 generators/vulcanize/templates/base/script/cron-runner
nirvdrum-rubber-2.0.0.rails3.beta6 lib/generators/vulcanize/templates/base/script/cron-runner