Skip to main content
Version: v2

Target nodes spec

Target nodes spec

You can choose whether a job is run on a node or nodes by specifying tags and a count of target nodes having this tag do you want a job to run.

The target node syntax: [tag-value]:[count]

Examples:

Target all nodes with a tag:

{
    "name": "job_name",
    "command": "/bin/true",
    "schedule": "@every 2m",
    "tags": {
        "my_role": "web"
    }
}

Target only one nodes of a group of nodes with a tag:

{
    "name": "job_name",
    "command": "/bin/true",
    "schedule": "@every 2m",
    "tags": {
        "my_role": "web:1"
    }
}

Dkron will try to run the job in the amount of nodes indicated by that count having that tag.