addjob zou moeten werken
This commit is contained in:
parent
8b8a8c560c
commit
e1c8edc956
1 changed files with 11 additions and 1 deletions
12
pbatch/pb.rb
12
pbatch/pb.rb
|
|
@ -10,6 +10,7 @@ PROCDIR = "processors"
|
|||
RESULTDIR = "results"
|
||||
FAILDIR = "failure"
|
||||
MONITORDIR = "monitor"
|
||||
RUNMODE = 0755
|
||||
CONFIG = "config"
|
||||
@config = { "waittime" => 3, "maxproc" => 3 }
|
||||
|
||||
|
|
@ -106,11 +107,20 @@ end
|
|||
def addjob
|
||||
p ARGV.join(" ")
|
||||
jobnumber=sprintf("%06d", increasejobscounter)
|
||||
p jobnumber
|
||||
puts "New job: #{jobnumber}"
|
||||
if FileTest.exists?("#{@basedir}/#{JOBSDIR}/#{jobnumber}")
|
||||
puts "Job #{jobnumber} already scheduled. This should not happen."
|
||||
exit
|
||||
end
|
||||
File.open("#{@basedir}/#{JOBSDIR}/#{jobnumber}"){|file|
|
||||
file.puts ARGV.join(" ")
|
||||
}
|
||||
File.chmod(RUNMODE, "#{@basedir}/#{JOBSDIR}/#{jobnumber}")
|
||||
end
|
||||
|
||||
def addjobfromfile
|
||||
# File.copy asdfasdf
|
||||
jobnumber=sprintf("%06d", increasejobscounter)
|
||||
end
|
||||
|
||||
def createconfig
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue