Our documentation websites are currently offline due to a data center fire. We do not yet have an ETA for restoring service; we’ll update this message when we know more.

Local job with Queue while useing a cluster jobrunner

Is there a way in Queue to let a job executed locally instead of submitting it to the cluster with drmaa? I know this must be possible since the scatter jobs are also not submitted at the cluster, could only not find how to do this.

For example I have a sniplet of a job that can easily run local:

class Ln extends CommandLineFunction {
  @Input(doc="Input file") var in: File = _
  @Output(doc="Link destination") var out: File = _

  def commandLine = {
    "ln -sf " + required(in) + required(out)
  }
}

I hope you can help me out with this.

Tagged:

Best Answer

Answers

  • pjvthofpjvthof NLMember

    Thanks for the reply, this seems to work. I now have a function that looks like this:

    class Ln extends InProcessFunction {
      @Input(doc="Input file") var in: File = _
      @Output(doc="Link destination") var out: File = _
    
      override def run {
        val cmd = "ln -s " + in + " " + out
        val exitcode = cmd.!
        System.out.println("cmd: '" + cmd + "', exitcode: " + exitcode)
      }
    }
    

    Only not sure if the override is really needed but right now this seems to work.

Sign In or Register to comment.