Create, run, and manage Domino Jobs - batch executions for scripts, training, and data processing. Covers job configuration, hardware tiers, scheduled jobs (cron), monitoring status, viewing logs, and API-driven execution. Use when running batch workloads, scheduling recurring tasks, or automating training pipelines.
This skill helps users create, run, and manage Domino Jobs - batch executions for running scripts, training models, and processing data.
Activate this skill when users want to:
A Job is a batch execution that runs a script or command in Domino. Unlike workspaces, jobs:
train.py)import requests, os
TOKEN = requests.get("http://localhost:8899/access-token").text.strip()
BASE = os.environ["DOMINO_API_HOST"]
PROJECT_ID = os.environ["DOMINO_PROJECT_ID"]
headers = {"Authorization": f"Bearer {TOKEN}", "Content-Type": "application/json"}
# Start a job
response = requests.post(
f"{BASE}/api/jobs/v1/jobs",
headers=headers,
json={
"projectId": PROJECT_ID,
"runCommand": "python train.py --epochs 100",
"title": "Training run",
}
)
job = response.json()
print(f"Job ID: {job['id']}")# Start a job with script
domino run train.py
# Run with arguments
domino run train.py arg1 arg2 arg3
# Wait for job to complete
domino run --wait train.py arg1 arg2
# Run direct command (not a script)
domino run --direct "pip freeze | grep pandas"TOKEN=$(curl -s http://localhost:8899/access-token)
curl -X POST "$DOMINO_API_HOST/api/jobs/v1/jobs" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"projectId\": \"$DOMINO_PROJECT_ID\",
\"runCommand\": \"python train.py\",
\"hardwareTierId\": \"tier-id\",
\"environmentId\": \"env-id\"
}"python train.pypython train.py --data /mnt/data/train.csv --output /mnt/artifacts/model.pkljupyter nbconvert --to notebook --execute notebook.ipynbRscript analysis.Rbash pipeline.sh| Schedule | Cron Expression |
|---|---|
| Every hour | 0 0 * * * ? |
| Daily at midnight | 0 0 0 * * ? |
| Every Monday 9 AM | 0 0 9 ? * MON |
| First of month | 0 0 0 1 * ? |
Domino scheduled jobs use Quartz cron (six required fields, optional seventh year field; seconds first). This is not Unix five-field crontab. Use ? in day-of-month or day-of-week when the other field is set. Field rules and special characters (*, -, /, L, W, #): Quartz CronTrigger tutorial.
┌───────────── second (0-59)
│ ┌───────────── minute (0-59)
│ │ ┌───────────── hour (0-23)
│ │ │ ┌───────────── day of month (1-31)
│ │ │ │ ┌───────────── month (1-12)
│ │ │ │ │ ┌───────────── day of week (0-7, SUN-SAT)
│ │ │ │ │ │
* * * * * *Sequential: Wait for previous job to complete before starting next
# Good for jobs that depend on previous output
# Example: Daily model retrain that uses previous day's dataConcurrent: Allow multiple jobs to run simultaneously
# Good for independent jobs
# Example: Hourly data refresh that doesn't depend on previous runsConfigure in job settings:
Trigger Model API republish after job completes:
Files written to /mnt/ directories are available after job completion:
/mnt/results/ - Custom outputs/mnt/artifacts/ - Model artifactsView logs in Domino UI or via API:
# Get job logs
logs = domino.runs_get_logs(run_id)
print(logs)All print statements and errors are captured in job logs.
import os
# Domino-provided
run_id = os.environ.get('DOMINO_RUN_ID')
project_name = os.environ.get('DOMINO_PROJECT_NAME')
username = os.environ.get('DOMINO_USER_NAME')
# Custom (set in project or job settings)
api_key = os.environ.get('MY_API_KEY')import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--data-path', required=True)
parser.add_argument('--model-output', required=True)
parser.add_argument('--epochs', type=int, default=100)
args = parser.parse_args()import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
logger.info("Starting training...")
logger.info(f"Epoch {epoch}/{total_epochs}")
logger.info("Training complete!")try:
train_model(data)
except Exception as e:
logger.error(f"Training failed: {e}")
# Save checkpoint
save_checkpoint(model, "checkpoint.pt")
raiseimport joblib
# Save model
joblib.dump(model, "/mnt/artifacts/model.joblib")
# Save metrics
with open("/mnt/artifacts/metrics.json", "w") as f:
json.dump(metrics, f)status = domino.runs_status(run_id)
print(f"Status: {status['status']}")
print(f"Started: {status['startedAt']}")domino.runs_stop(run_id)Before writing or verifying any API call, confirm endpoint paths and field names in API-SPECS.md (use the Public routes section for /api/jobs/…; use Internal routes for legacy /v4/jobs/… and /v4/runs/…). Use public docs for workflow context and field explanations.
Get the cluster base URL: $DOMINO_API_HOST (injected by Domino into every workspace, job, and app).
Public docs (workflow context and field explanations):
dominodatalab/domino-claude-plugin
7949e3a
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.