Sha256: 5bef6e609980c26b394d483a30a111190ccba6c81e79846a1094f156164a39c6
Contents?: true
Size: 475 Bytes
Versions: 40
Compression:
Stored size: 475 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} -- script/runner} + ARGV system "script/cron-sh", *args
Version data entries
40 entries across 40 versions & 5 rubygems