管理 Job

SkillMonitoring & ops

Use when you need to view, filter, or manage Jobs (run records) in the Ordine system, including viewing run status, logs, and results. Trigger words: 查看job, job状态, 运行记录, 管理作业, 查看运行历史.

Use 管理 Job in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add 管理 Job and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use the 管理 Job skill

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Add Ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.

管理 JobStart free

What this skill tells your AI

The instructions your AI receives, as published by forge-town/ordine in skills/ordine-manage-job/SKILL.md and read by Ahel’s review.

概述

Job 是 Pipeline 的一次运行记录,包含状态、日志和结果。当你通过 CLI ordine run 或 REST API POST /api/pipelines/:id/run 触发 Pipeline 时,会创建一个 Job。

通过 CLI 管理

运行并自动跟踪 Job

# 运行 Pipeline 会自动 follow Job
ordine run pipe_check_dao -i ./src

# 不等待完成
ordine run pipe_check_dao --no-follow

CLI run 命令会自动轮询 Job 状态(每 3 秒),实时打印日志,直到 done/failed/cancelled。

通过 REST API 管理

# 列出所有 Job
curl -s http://localhost:9433/api/jobs | python3 -m json.tool

# 按状态过滤
curl -s "http://localhost:9433/api/jobs?status=running" | python3 -m json.tool
curl -s "http://localhost:9433/api/jobs?status=failed" | python3 -m json.tool

# 按项目过滤
curl -s "http://localhost:9433/api/jobs?projectId=proj_xxx" | python3 -m json.tool

# 查看单个 Job 详情(含日志和结果)
curl -s http://localhost:9433/api/jobs/job_xxx | python3 -m json.tool

# 创建 Job(通常由 Pipeline run 自动创建)
curl -X POST http://localhost:9433/api/jobs \
  -H "Content-Type: application/json" \
  -d '{
    "id": "job_manual_001",
    "pipelineId": "pipe_check_dao",
    "status": "pending"
  }'

# 更新 Job 状态
curl -X PATCH http://localhost:9433/api/jobs/job_manual_001 \
  -H "Content-Type: application/json" \
  -d '{ "status": "running" }'

# 删除 Job
curl -X DELETE http://localhost:9433/api/jobs/job_manual_001

数据结构

字段类型说明
idstring唯一标识
pipelineIdstring | null关联的 Pipeline ID
projectIdstring | null关联的项目 ID
statusJobStatus状态:pending, running, completed, failed
resultJSON | null运行结果(summary, output 等)
errorstring | null错误信息
startedAttimestamp | null开始时间
completedAttimestamp | null完成时间
createdAttimestamp创建时间

Job 状态流转

pending → running → completed
                  → failed

常见任务

查看最近失败的 Job

curl -s "http://localhost:9433/api/jobs?status=failed" | python3 -c "
import sys, json
jobs = json.load(sys.stdin)
for j in jobs:
    print(f\"{j['id']}  pipeline={j.get('pipelineId')}  error={j.get('error','(none)')}\")
"

清理历史 Job

# 列出所有 completed 的 Job,逐个删除
curl -s "http://localhost:9433/api/jobs?status=completed" | python3 -c "
import sys, json
for j in json.load(sys.stdin):
    print(j['id'])
" | while read id; do
  curl -X DELETE "http://localhost:9433/api/jobs/$id"
done

Signals

GitHub stars
28
Forks
2
Last commit
Oct 2026
Advanced
Item type
skill
Key
ordine-manage-job
Source
github.com/forge-town/ordine