0.9.6
CentOS
I'm try to put this but not work:
"reschedule": {
"attempts": 0,
"unlimited": false
},
I've been able to keep my batch jobs from both retrying and rescheduling by doing the following.
Adding a restart stanza and a reschedule stanza.
job "echo-dispatch" {
datacenters = ["dc1"]
type = "batch"
priority = 1
parameterized {
payload = "forbidden"
meta_required = ["message"]
meta_optional = []
}
group "echo" {
task "echo" {
driver = "exec"
config {
command = "echo"
args = ["${NOMAD_META_message}"]
}
}
restart {
attempts = 0
mode = "fail"
}
}
reschedule {
attempts = 0
}
}
@jonatasfreitasv the reschedule/restart stanzas provided by @erhlee-bird above are the right way to disable rescheduling and local restarts. Closing this since the question has been answered
Most helpful comment
I've been able to keep my batch jobs from both retrying and rescheduling by doing the following.
Adding a restart stanza and a reschedule stanza.