Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ai-assets/skills/fabric-cli-core/references/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ fab job run-sch "Production.Workspace/Pipeline.DataPipeline" -i '{"enabled": tru
#### Syntax

```bash
fab job run-update <item_path> --id <schedule_id> [--type <type>] [--interval <interval>] [--enable] [--disable] [-i <json>]
fab job run-update <item_path> --id <schedule_id> [--type <type>] [--interval <interval>] [--start <start>] [--end <end>] [--days <days>] [--enable] [--disable] [-i <json>]
```

#### Examples
Expand Down
7 changes: 7 additions & 0 deletions .changes/unreleased/fixed-20260826-192501.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: fixed
body: Fixed `job run-update --help` crashing with an `AssertionError` instead of printing
help
time: 2026-08-26T19:25:01.000000000+03:00
custom:
Author: ayeshurun
AuthorLink: https://github.com/ayeshurun
35 changes: 30 additions & 5 deletions docs/commands/jobs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ The `job` commands provide tools for starting, running, monitoring, and scheduli
|-----------------|---------------------------|-----------------------------------------------------------------------|
| `job start` | Start an item (async) | `job start <path> [-P <params>] [-C <config>] [-i <json_inline_or_path>]` |
| `job run` | Run an item (sync) | `job run <path> [-P <params>] [-C <config>] [-i <json_inline_or_path>] [--timeout <seconds>]` |
| `job run-cancel`| Cancel an item run | `job run-cancel <path> [--id <id>] [--wait]` |
| `job run-cancel`| Cancel an item run | `job run-cancel <path> --id <id> [--wait]` |
| `job run-list` | List item or scheduled job runs | `job run-list <path> [--schedule]` |
| `job run-status`| Get job run details | `job run-status <path> [--id <id>] [--schedule]` |
| `job run-sch` | Schedule a job | `job run-sch <path> [-i <json_inline_or_path>*] [--type <type>] [--interval <interval>] [--days <days>]` |
| `job run-update`| Update a scheduled job | `job run-update <path> [--id <id>] [-i <json_inline_or_path>] [--type <type>] [--enable/--disable]` |
| `job run-rm` | Delete a scheduled job | `job run-rm <path> [--id <scheduled-id>] [--force]` |
| `job run-status`| Get job run details | `job run-status <path> --id <id> [--schedule]` |
| `job run-sch` | Schedule a job | `job run-sch <path> [-i <json_inline_or_path>] [--type <type>] [--interval <interval>] [--days <days>]` |
| `job run-update`| Update a scheduled job | `job run-update <path> --id <id> [-i <json_inline_or_path>] [--type <type>] [--interval <interval>] [--start <start>] [--end <end>] [--days <days>] [--enable] [--disable]` |
| `job run-rm` | Delete a scheduled job | `job run-rm <path> --id <scheduled-id> [--force]` |

---

Expand Down Expand Up @@ -162,6 +162,31 @@ fab job run-cancel <path> --id <job_id> [--wait]

---

### run-update

Update an existing scheduled job.

**Usage:**

```
fab job run-update <path> --id <schedule_id> [-i <json_inline_or_path>] [--enable] [--disable] [--type <type>] [--interval <interval>] [--start <start>] [--end <end>] [--days <days>]
```

**Parameters:**

- `<path>`: Path to the resource.
- `--id`: Schedule ID to update.
- `-i, --input`: JSON payload, inline or path. Optional.
- `--enable`: Enable the schedule. Optional.
- `--disable`: Disable the schedule. Optional.
- `--type`: Type of schedule (`cron`, `daily`, `weekly`). Optional.
- `--interval`: Interval in minutes or time list. Optional.
- `--start`: Start date and time in UTC. Optional.
- `--end`: End date and time in UTC. Optional.
- `--days`: Days of the week. Optional.

---

### run-rm

Remove a scheduled job.
Expand Down
5 changes: 3 additions & 2 deletions src/fabric_cli/parsers/fab_jobs_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def register_parser(subparsers: _SubParsersAction) -> None:
"# set up pipeline schedule to run every 10 minutes and enable it",
"$ job run-sch pip1.DataPipeline --type cron --interval 10 --start 2024-11-15T09:00:00 --end 2024-12-15T10:00:00 --enable \n",
"# set up pipeline schedule to run every day at 10:00 and 16:00 (disabled by default)",
"$ job run-update pip1.DataPipeline --id <schedule_id> --type daily --interval 10:00,16:00 --start 2024-11-15T09:00:00 --end 2024-12-16T10:00:00 \n",
"$ job run-sch pip1.DataPipeline --type daily --interval 10:00,16:00 --start 2024-11-15T09:00:00 --end 2024-12-16T10:00:00 \n",
"# set up pipeline schedule to run every Monday and Friday at 10:00 and 16:00, disabled by default",
"$ job run-sch pip1.DataPipeline --type weekly --interval 10:00,16:00 --days Monday,Friday --start 2024-11-15T09:00:00 --end 2024-12-16T10:00:00 \n",
"# set up pipeline schedule with custom input",
Expand Down Expand Up @@ -221,7 +221,7 @@ def register_parser(subparsers: _SubParsersAction) -> None:
# Subcommand for 'run_update'
update_examples = [
"# disable pipeline schedule",
"$ job run-update pip1.DataPipeline --id <schedule_id> --disabled \n",
"$ job run-update pip1.DataPipeline --id <schedule_id> --disable \n",
"# update pipeline schedule to run every 10 minutes and enable it",
"$ job run-update pip1.DataPipeline --id <schedule_id> --type cron --interval 10 --start 2024-11-15T09:00:00 --end 2024-12-15T10:00:00 --enable \n",
"# update pipeline schedule to run every day at 10:00 and 16:00 (maintain the existing enabled state)",
Expand Down Expand Up @@ -276,6 +276,7 @@ def register_parser(subparsers: _SubParsersAction) -> None:
run_update_parser.add_argument(
"--days", metavar="", help="Days of the week. Optional"
)
run_update_parser.usage = f"{utils_error_parser.get_usage_prog(run_update_parser)}"
run_update_parser.set_defaults(func=lazy_command(_jobs_module_path, 'run_update_command'))

# Subcommand for 'run_rm'
Expand Down