Skip to main content
Version: v3

Shell Executor

Shell executor runs a system command

Configuration

Params

shell: Run this command using a shell environment
command: The command to run
env: Env vars separated by comma
cwd: Chdir before command run
timeout: Force kill job after specified time. Format: https://golang.org/pkg/time/#ParseDuration.

Example

{
"executor": "shell",
"executor_config": {
"shell": "true",
"command": "my_command",
"env": "ENV_VAR=va1,ANOTHER_ENV_VAR=var2",
"cwd": "/app",
"timeout": "24h"
}
}

Job execution prometheus metrics

Path: /metrics
Port: 9422
or configure via environment variable SHELL_EXECUTOR_PROMETHEUS_PORT

Exposed metrics

NameTypeDescriptionLabels
dkron_job_cpu_usagegaugecurrent CPU usage by jobjob_name
dkron_job_mem_usage_kbgaugecurrent memory consumed by jobjob_name