nano-run/_docs/unit.md

23 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2020-09-10 07:11:34 -03:00
# Unit
2020-11-07 10:38:13 -03:00
* If work dir not defined - temporary directory will be created and removed after execution for each request automatically.
Schema:
* `command` (required, string) - command to execute (will be executed in a shell)
2020-12-01 09:16:41 -03:00
* `user` (optional, string) - custom user as process owner (only `bin` mode and only for linux), usually requires root privileges
2020-11-07 10:38:13 -03:00
* `interval` (optional, interval) - interval between attempts
* `timeout` (optional, interval) - maximum execution timeout (enabled only for bin mode and only if positive)
* `graceful_timeout` (optional, interval) - maximum execution timeout after which SIGINT will be sent (enabled only for bin mode and only if positive).
Ie: how long to let command react on SIGTERM signal.
* `shell` (optional, string) - shell to execute command in bin mode (default - /bin/sh)
* `environment` (optional, map string=>string) - custom environment for executable (in addition to system)
* `max_request` (optional, integer) - maximum HTTP body size (enabled if positive)
* `attempts` (optional, integer) - maximum number of attempts
* `workers` (optional, integer) - concurrency level - number of parallel requests
* `mode` (optional, string) - execution mode: `bin` or `cgi`
* `workdir` (optional, string) - working directory for the worker. if empty - temporary one will be generated automatically.
* `authorization` (optional, [Authorization](authorization.md)) - request authorization
2020-11-08 08:00:03 -03:00
* `cron` (optional,[Cron](cron.md)) - scheduled requests
* `private` (optional, bool) - do not expose over API, could be used for cron-only jobs