| name | dx-jobs |
| description | Check and manage DNAnexus jobs. Use when the user asks to check DNAnexus job status, monitor dx jobs, inspect failures, review job logs, summarize failed jobs, or resubmit failed DNAnexus jobs. |
| recommended_scope | project |
DNAnexus Job Management
Use this skill for DNAnexus job status checks, failure inspection, and resubmission workflows.
Prerequisites
Ensure dx is available in the shell. If not, activate the appropriate conda environment or check the user's PATH.
Before broad job queries, identify the active DNAnexus context:
dx whoami
dx env
Use --project <PROJECT> when the user specifies a project or when the active project is ambiguous.
Check Job Status
Get a status breakdown for a batch of jobs by name pattern:
for state in done failed running runnable; do
count=$(dx find jobs --name "<NAME_PATTERN>" --state $state --num-results 10000 --brief 2>&1 | wc -l)
echo "$state: $count"
done
dx find jobs defaults to 1000 results. Always pass --num-results 10000 for large batches.
Inspect Failed Jobs
Get failure reasons for all failed jobs:
dx find jobs --name "<NAME_PATTERN>" --state failed --num-results 10000 --brief 2>&1 | while read -r jobid; do
echo "=== $jobid ==="
dx describe "$jobid" --json 2>&1 | python3 -c "
import sys, json
d = json.load(sys.stdin)
print(f\"Name: {d.get('name', '')}\")
print(f\"Reason: {d.get('failureReason', '')}\")
print(f\"Message: {d.get('failureMessage', '')[:200]}\")
"
done
Common failure reasons:
AppInsufficientResourceError with "Out of memory": resubmit with a larger instance type.
AppError: check the job log with dx watch <job-id> or dx describe <job-id> --json.
Check a Single Job
dx describe <JOB_ID> --json 2>&1 | python3 -c "
import sys, json
d = json.load(sys.stdin)
print(f\"State: {d['state']}\")
print(f\"Name: {d.get('name', '')}\")
"
Resubmit Failed Jobs
Before resubmitting, inspect the original job's inputs, destination, command, and instance type. Extract the failed shard or job index from the failed job's name only when the naming convention clearly encodes it.
dx run app-swiss-army-knife \
-icmd="<COMMAND>" \
--destination "<OUTPUT_PATH>" \
--instance-type <LARGER_INSTANCE> \
--priority high \
--name "<JOB_NAME>" \
--brief --ignore-reuse -y
Determine the appropriate command and parameters from the original submission script or dx describe <JOB_ID> --json. Preserve the original output naming convention unless the user asks for a different rerun layout.
Instance Type Reference
| Instance | vCPUs | RAM |
|---|
mem1_ssd1_v2_x2 | 2 | 4 GB |
mem1_ssd1_v2_x4 | 4 | 8 GB |
mem3_ssd1_v2_x4 | 4 | 32 GB |
mem3_ssd1_v2_x8 | 8 | 64 GB |
mem3_ssd1_v2_x16 | 16 | 128 GB |