Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// 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