Skip to content

Update Task

The tasks update command updates an existing task from inline parameters or a JSON file. Uses TASK_ID if given, otherwise resolves by --name.

Modes

Mode When to Use
Inline Quick field updates โ€” pass only the fields to change as CLI flags.
File (--file) Bulk or complex updates โ€” provide a JSON file with fields to change.

Both modes are mutually exclusive. If --file is provided, all inline parameters are ignored.

Parameters

Identification

Parameter Description
TASK_ID Task ID (optional positional). Omit to use --name resolution.
--name, -n Task name โ€” used to look up the task ID when TASK_ID is omitted. Can also update the name itself.

File Mode

Parameter Description
--file, -f JSON file with task updates.

Inline Parameters (all optional โ€” only provided fields are updated)

Parameter Description
--cmd, -c Command to run.
--host Agent hostname.
--description, -d Task description.
--run-as-user System user to run the command as.
--active / --inactive Active status.
--group-id, -g Group ID.
--timezone, -z Timezone in IANA format.
--trigger-times Comma-separated times in HH:MM format. Automatically deduplicated and sorted.
--day-of-week 7-character binary string for MTWTFSS (e.g. 1111100 = Monโ€“Fri).
--ordinal-day Ordinal day description.
--run-frequency Run frequency in HH:MM-HH:MM-freq format.
--calendar Calendar name (must exist in the backend).
--dependency Dependency string (e.g. S:taskname).
--max-run-time Maximum run time in seconds (1โ€“172800).
--retry-attempts Number of retry attempts on failure.
--stdout File path for stdout capture.
--stderr File path for stderr capture.
--profile Profile name.
--task-owner Task owner.

Mutual Exclusivity

  • Only one of --trigger-times or --run-frequency may be provided (not both).
  • Only one of --day-of-week or --ordinal-day may be provided (not both).

๐Ÿ–ฅ๏ธ Basic Usage

easytask tasks update -h
 Usage: easytask tasks update [OPTIONS] [TASK_ID]

 Update a task from inline parameters or a JSON file. Uses TASK_ID if given,
 otherwise looks up by name.

โ•ญโ”€ Arguments โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚   task_id      INTEGER  Task ID (optional if using --name or --file)            โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ --file            -f      PATH     JSON file with task updates                  โ”‚
โ”‚ --name            -n      TEXT     Task name (also resolves ID if TASK_ID       โ”‚
โ”‚                                            is omitted)                          โ”‚
โ”‚ --cmd             -c      TEXT     Command to run                               โ”‚
โ”‚ --host                    TEXT     Agent hostname                               โ”‚
โ”‚ --description     -d      TEXT     Task description                             โ”‚
โ”‚ --run-as-user              TEXT     Run as user                                 โ”‚
โ”‚ --active / --inactive               Active status                              โ”‚
โ”‚ --group-id        -g      INT      Group ID                                    โ”‚
โ”‚ --timezone        -z      TEXT     Timezone                                    โ”‚
โ”‚ --trigger-times            TEXT     Comma-separated HH:MM                       โ”‚
โ”‚ --day-of-week              TEXT     7-char binary MTWTFSS                       โ”‚
โ”‚ --ordinal-day              TEXT     Ordinal day                                โ”‚
โ”‚ --run-frequency            TEXT     HH:MM-HH:MM-freq                           โ”‚
โ”‚ --calendar                 TEXT     Calendar name                              โ”‚
โ”‚ --dependency               TEXT     Dependency string                           โ”‚
โ”‚ --max-run-time             INT      Max run time in seconds                    โ”‚
โ”‚ --retry-attempts           INT      Retry attempts                             โ”‚
โ”‚ --stdout                   TEXT     Stdout file path                           โ”‚
โ”‚ --stderr                   TEXT     Stderr file path                           โ”‚
โ”‚ --profile                  TEXT     Profile name                               โ”‚
โ”‚ --task-owner               TEXT     Task owner                                 โ”‚
โ”‚ --help             -h               Show this message and exit.                 โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Inline Mode Examples

Update task command by ID

easytask tasks update 42 --cmd "/usr/bin/python3 /scripts/process_v2.py"
Task 42 updated.

Update task by name resolution

When you don't know the task ID, use --name to look it up:

easytask tasks update --name "data_processing" --description "Updated description" --active
Resolved task_name 'data_processing' โ†’ ID 42
Task 42 updated.

Update trigger times (automatically sorted)

easytask tasks update 44 --trigger-times "23:00,01:00,11:00,17:00"
Task 44 updated.

Deactivate a task

easytask tasks update 42 --inactive
Task 42 updated.

Update max run time and retry

easytask tasks update 42 --max-run-time 7200 --retry-attempts 5
Task 42 updated.

File Mode Examples

Sample Input

task_update.json
{
  "cmd": "/usr/bin/python3 /scripts/process_v2.py",
  "max_run_time": 7200,
  "active": true
}

Example

easytask tasks update 42 -f task_update.json
Task 42 updated.

โญ๏ธ Next Steps