Sha256: 64072d8c843666c7384b28e62843d81e606c0f6c4cee2a82f1e80ec62ba66116
Contents?: true
Size: 474 Bytes
Versions: 78
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
78 entries across 39 versions & 5 rubygems