1job "factorial_windows" {
2  datacenters = ["dc1"]
3  type        = "service"
4
5  constraint {
6    attribute = "${attr.kernel.name}"
7    value     = "windows"
8  }
9
10  group "test" {
11    count = 1
12
13    task "test1" {
14      driver = "raw_exec"
15
16      template {
17        data = <<EOH
18foreach ($loopnumber in 1..2147483647) {
19  $result=1;foreach ($number in 1..2147483647) {
20    $result = $result * $number
21  };$result
22}
23  EOH
24
25        destination = "local/factorial.ps1"
26      }
27
28      config {
29        command = "powershell"
30        args    = ["local/factorial.ps1"]
31      }
32    }
33  }
34}
35