Skip to content

Instantly share code, notes, and snippets.

@mitchellh
Created June 4, 2016 04:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitchellh/08f0a166e49d3469c00401bea3989e06 to your computer and use it in GitHub Desktop.
Save mitchellh/08f0a166e49d3469c00401bea3989e06 to your computer and use it in GitHub Desktop.
// 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