Skip to main content

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

ImagePullPolicy
string or null
Enum: "Never" "Always" "IfNotPresent"

Policy for pulling images related to process objects (job, cargo, vm)

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": [
    ],
  • "Metadata": {
    },
  • "Schedule": "string",
  • "Ttl": 0,
  • "ImagePullSecret": "string",
  • "ImagePullPolicy": "Never",
  • "Containers": [
    ]
}