github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/e2e/rescheduling/input/rescheduling_fail.nomad (about)

     1  job "test2" {
     2  
     3    datacenters = ["dc1", "dc2"]
     4  
     5    constraint {
     6      attribute = "${attr.kernel.name}"
     7      value     = "linux"
     8    }
     9  
    10    type = "service"
    11  
    12    group "t2" {
    13      count = 3
    14  
    15      task "t2" {
    16        driver = "raw_exec"
    17  
    18        config {
    19          command = "bash"
    20          args    = ["-c", "lol 5000"]
    21        }
    22      }
    23  
    24      restart {
    25        attempts = 0
    26        delay    = "0s"
    27        mode     = "fail"
    28      }
    29  
    30      reschedule {
    31        attempts  = 2
    32        interval  = "5m"
    33        unlimited = false
    34      }
    35    }
    36  }