Usage

Concurrency

Concurrency Jobs can be configured to allow overlapping executions or forbid them. Concurrency property accepts two option: allow (default): Allow concurrent job executions. forbid: If the job is already running don’t send the execution, it will skip the executions until the next schedule. »

Cron spec

CRON Expression Format A cron expression represents a set of times, using 6 space-separated fields. Field name | Mandatory? | Allowed values | Allowed special characters ---------- | ---------- | -------------- | -------------------------- Seconds | Yes | 0-59 | * / , - Minutes | Yes | 0-59 | * / , - Hours | Yes | 0-23 | * / , - Day of month | Yes | 1-31 | * / , - ? »

Cron spec

Job chaining You can set some jobs to run after other job is executed. To setup a job that will be executed after any other given job, just set the parent_job property when saving the new job. The dependent job will be executed after the main job finished a successful execution. Child jobs schedule property will be ignored if it’s present. »

Dkron REST API

Overview You can communicate with Dkron using a RESTful JSON API over HTTP. Dkron nodes usually listen on port 8080 for API requests. All examples in this section assume that you’ve found a running leader at localhost:8080. Dkron implements a RESTful JSON API over HTTP to communicate with software clients. Dkron listens in port 8080 by default. All examples in this section assume that you’re using the default port. »

Integration

Use with Amazon ECS To use Dkron to schedule jobs that run in containers, a wrapper ECS script is needed. Install the following snippet in the node that will run the call to ECS Prerequisites The node that will run the call to ECS will need to have installed AWS cli jq Example ecs-run --cluster cron --task-definition cron-taskdef --container-name cron --region us-east-1 --command "rake foo" »

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. 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: »