Job
In Nanocl, a Job
is a list of commands to run.
Unlike a Cargo it aim to stop running.
There is the openapi specification for a JobPartial
used to create a job
:
required | Array of objects (Config) List of container to run |
null or ImagePullPolicy (string) | |
ImagePullSecret | string or null Secret to use when pulling the image |
object Metadata (user defined) | |
Name required | string Name of the job |
Schedule | string or null Schedule of the job (cron) |
Secrets | Array of strings or null Secrets to load as environment variables |
Ttl | integer or null >= 0 Remove the job after (x) seconds after execution |
{- "Name": "string",
- "Secrets": [
- "string"
], - "Metadata": {
- "property1": "string",
- "property2": "string"
}, - "Schedule": "string",
- "Ttl": 0,
- "ImagePullSecret": "string",
- "ImagePullPolicy": { },
- "Containers": [
- {
- "Hostname": "string",
- "Domainname": "string",
- "User": "string",
- "AttachStdin": true,
- "AttachStdout": true,
- "AttachStderr": true,
- "ExposedPorts": {
- "property1": {
- "property1": null,
- "property2": null
}, - "property2": {
- "property1": null,
- "property2": null
}
}, - "Tty": true,
- "OpenStdin": true,
- "StdinOnce": true,
- "Env": [
- "string"
], - "Cmd": [
- "string"
], - "Healthcheck": { },
- "ArgsEscaped": true,
- "Image": "string",
- "Volumes": {
- "property1": {
- "property1": null,
- "property2": null
}, - "property2": {
- "property1": null,
- "property2": null
}
}, - "WorkingDir": "string",
- "Entrypoint": [
- "string"
], - "NetworkDisabled": true,
- "MacAddress": "string",
- "OnBuild": [
- "string"
], - "Labels": {
- "property1": "string",
- "property2": "string"
}, - "StopSignal": "string",
- "StopTimeout": 0,
- "Shell": [
- "string"
], - "HostConfig": { },
- "NetworkingConfig": { }
}
]
}