Skip to content

Commit

Permalink
Better docs on targeting nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Castell committed Jul 26, 2016
1 parent 0cd3536 commit 3b2fe7c
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions docs/docs/guides.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Guides

## 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.

### Examples:

Target all nodes with a tag:

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

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

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

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

## CRON Expression Format

A cron expression represents a set of times, using 6 space-separated fields.
Expand Down

0 comments on commit 3b2fe7c

Please sign in to comment.