Raw_exec job on FreeBSD

Hi there,

for a project that I have to do for school I have to use nomad on freeBSD. I got this to work but I also want to create jobs ofcourse. I would like to create a raw_exec job and I got most of it working I think except for the command and args part as I don’t really know what that part of the job needs. Does command need an actual command. So basically what I have is a script that I want to execute. This script can be found under /home/myuser/Desktop/scripts. This script, for now example purposes, write hello world to the console. The job I wrote to try and execute is this.

job "hello" {
 datacenters = ["dc1"]
 type = "batch"
 group "hellogroup" {
  task "hellotask" {
   driver = "raw_exec"
   config {
    command ="/bin/sh"
    args = ["hello.sh"]
   }
  }
 }
}

I don’t know if what I did here is correct or that I should use another driver or something.
Anyway thanks already for your help!

This looks correct- although the raw_exec driver is turned off by default - make sure it’s enabeld by the clients.