I want to run a Stalker job, only when the CPU load is less so that the site wont be affected.
The job is to convert videos from any format to flv and mp4. so its a pretty expensive job.
how can i achieve this?
EDIT
is this a good way?
how about smthng like
load = `uptime`.gsub(/(.*): /,'').strip.split ' '
if (load[0].to_f < 0.7 && load[0].to_f < load[1].to_f) || (!args["max_delay"].nil? && total_delay > args["max_delay"] && load[0].to_f < 0.85)
do stuff
end