Created
June 4, 2016 04:00
-
-
Save mitchellh/08f0a166e49d3469c00401bea3989e06 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A job that is used to run the GC more often than the Nomad client | |
// default for machines that have low disk. | |
job "periodic-gc" { | |
datacenters = ["dc1"] | |
type = "batch" | |
periodic { | |
// Launch every hour | |
cron = "0 * * * * *" | |
// Do not allow overlapping runs. | |
prohibit_overlap = true | |
} | |
task "periodic-gc" { | |
driver = "raw_exec" | |
config { | |
command = "/usr/bin/curl" | |
args = ["-X", "PUT", "http://127.0.0.1:4646/v1/system/gc"] | |
} | |
resources { | |
cpu = 20 | |
memory = 10 | |
network { | |
mbits = 10 | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment