Skip to main content
Version: 0.0.42

Manage Jobs

Job definitions are scheduled or on-demand automation tasks configured in Lakehousecat. This guide covers listing, triggering, and monitoring job runs via CLI.

List Job Definitions​

lhc jobs list

Get a Job Definition​

lhc jobs get <definition-id>

Trigger a Job Run​

Start a job run for a given definition:

lhc jobs trigger <definition-id>

The command returns the created job run object, including a run-id you can use to check status.

Check Job Run Status​

lhc jobs status <run-id>

List All Job Runs​

lhc jobs runs

Automation Example​

Trigger a job and poll until it completes:

DEFINITION_ID="<your-definition-id>"

RUN_ID=$(lhc jobs trigger "$DEFINITION_ID" --output json \
| python3 -c "import json,sys; print(json.load(sys.stdin)['id'])")

echo "Job run started: $RUN_ID"

while true; do
STATUS=$(lhc jobs status "$RUN_ID" --output json \
| python3 -c "import json,sys; print(json.load(sys.stdin).get('status',''))")
echo "Status: $STATUS"
[ "$STATUS" = "completed" ] || [ "$STATUS" = "failed" ] && break
sleep 10
done