TaskCreate
Create and launch a new task.
Unix
qarnot task create
Windows
qarnot.exe task create
USAGE:
Classic usage:
qarnot task create --constants "DOCKER_CMD=echo hello world" --instance 4 --name "Task name" --profile docker-batch
qarnot task create --constants="DOCKER_CMD=echo hello world" --instance=4 --name="Task name" --profile=docker-batch
Usage with a set of constants:
qarnot task create --constants "DOCKER_CMD=echo hello world" DOCKER_REPO=library/ubuntu DOCKER_TAG=latest --instance 4 --name "Task name" --profile docker-batch
File config usage (see documentation):
qarnot task create --file FileName.json
Logging errors (missing instance):
qarnot task create --constants "DOCKER_CMD=echo hello world" --name "Task name" --pool POOL-UUID
Flags:
--job Uuid or Shortname of the job attached to the task.
--pool Uuid or Shortname of the pool attached to the task.
-n, --name Name of the task.
-s, --shortname ShortName of the task.
-p, --profile Name of the profile used for the task.
--range Range of the task.
-i, --instance Instance count of the task.
-f, --file File with a json configuration of the task. (example : echo '{"Shortname": "SN","Name": "TaskName","Profile": "docker-batch","Constants": [ "DOCKER_CMD=echo hello world", ],"InstanceCount": 1}' > CreateTask.json)
-t, --tags Tags of the task.
-c, --constants Constants of the task.
--constraints Constraints of the task.
--labels Labels of the task.
-r, --resources Name of the buckets of the task.
--result Name of the bucket result of the task.
--wait-for-resources-synchronization Wait for the pool resources to synchronized before launching the task (set to true or false, default: null).
--max-total-retries Total number of times the task can have its instances retried in case of failure
--max-retries-per-instance Total number of times each task instance will be allowed to retry in case of failure
-d, --dependents List of Uuid the task need to wait before start running.(must be use with a job with "is-dependent" set)
--ttl Default TTL for the task resources cache (in seconds). Default is 7776000s.
--secrets-access-rights-by-key Give the task access to secrets described by their keys. Only available to standalone task, use `--secrets-access-rights-by-key` on the pool for tasks running within a pool.
--secrets-access-rights-by-prefix Give the task access to secrets described by their prefixes. Only available to standalone task, use `--secrets-access-rights-by-prefix` on the pool for tasks running within a pool.
--token Connection API Token.
--unsafe-ssl Don't check the ssl certificate.
--api-ca-certificate Path of your custom Ssl certificate.
-v, --verbose Set the max verbose messages.
-q, --quiet Set no verbose messages.
--no-color Remove the color on the console.
--format Change the result format. (format available: TABLE, JSON)(Default TABLE)
-h, --human-readable Print sizes in human readable format (e.g., 1K 234M 2G).
--periodic Periodic time, in seconds, to synchronize the task files to the output bucket.
--whitelist Whitelist of task files to be synchronized to the output bucket.
--blacklist Blacklist of task files to synchronize to the output bucket.
--export-credentials-to-env Activate the exportation of the api and storage credentials to the task environment. Default is false.
--help Display this help screen.
--version Display version information.
Version: qarnot-1.18.2.0-f150e6f-2023-12-22T14:29:30Z-.NET6.0.24
Copyright: Copyright (C) 2023 Qarnot computing