#!/usr/bin/env ruby if ARGV.size==0 puts "USAGE: mandy-map my_script.rb 'Job Name'" exit end def absolute_path(path) path =~ /^\// ? path : File.join(Dir.pwd, path) end file = absolute_path(ARGV[0]) job_name = ARGV[1] require file Mandy::Job.find_by_name(job_name).run_map