job — configuration format for jobd
Jobs are configured using a set of key/value pairs within a JSON configuration file. The only required key is the Label; all other keys are optional.
The following configuration options are available:
A short, one-line description of what the job does.
If true, the job will be automatically enabled. If the job is on-demand, it will be started as soon as the on-demand conditions are met. If the job is scheduled, it will be started according to the schedule. Otherwise, the job will start immediately.
If true, the program arguments will be passed to glob(3) for possible expansion.
A dictionary of environment variables to set in the process.
All jobs will be started with a minimal set of environment variables inherited from jobd. These variables may include one or more of the following:
DISPLAY, HOME, LOGNAME, PATH,
NLSPATH, LANG,
PWD, SHELL, TMPDIR, TZ, USER,
LC_ALL, LC_COLATE, LC_CTYPE, and other POSIX locale variables.
Any variables defined in the EnvironmentVariables section will override the default values inherited from jobd.
The name of the group that the program will run as.
If false, the initgroups(3) function will not be called to setup the supplemental groups.
If true, the program will be automatically restarted if it exits.
A globally unique job identifier. Labels should be constructed using reverse domain name notation.
If a string is provided, the string will be treated as the full path to the program to be executed. If the program takes any arguments, you must pass an array instead.
If an array is provided, the array contains arguments that will be passed to exec(3) to execute the program.
An array of sockets to be created by jobd(8) and used to launch the job when a client connects to a socket. (TODO: more documentation on this)
The path to a file where stdio(3) standard error should be redirected. By default, errors will be redirected to /dev/null.
The path to a file where stdio(3) standard input should be redirected. By default, input will be redirected from /dev/null.
The path to a file where stdio(3) standard output should be redirected. By default, output will be redirected to /dev/null.
If an integer is provided, the job will be started on a regular interval. The interval should be specified in seconds.
The value to pass to umask(2) before executing the program. It should be specified in octal notation using a string.
An alternate root directory for the process, entered via a call to chroot(2).
The amount of time to wait before automatically restarting a process if it dies. This has no effect unless the KeepAlive key is set to true. The default throttle interval is ten seconds.
The name of the user that the program will run as.
A directory to chdir(2) into prior to executing the process.