yao-job
यह क्या करती है
यह स्किल लंबे कमांड आपके लिए चलाती है। कमांड खत्म होने तक इंतज़ार किया जा सकता है या उन्हें बैकग्राउंड में छोड़ा जा सकता है। यह उन लोगों के लिए है जिन्हें लंबे काम बिना उन्हें खोए संभालने हैं।
कब इस्तेमाल करें
- ✓जब कोई कमांड लंबा चलेगा और आप उसे बैकग्राउंड में चलाना चाहते हैं।
- ✓जब आप जानना चाहें कि कोई बैकग्राउंड जॉब खत्म हुआ या नहीं।
- ✓जब कोई जॉब ज़रूरत से ज़्यादा देर चल रहा हो और उसे रोकना हो।
Skill का लिंक
https://github.com/YaoApp/yao/blob/main/tools/skills/yao-job/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“यह डेटा एक्सपोर्ट बैकग्राउंड में चलाइए और खत्म होने पर मुझे बताइए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट कमांड को फ़ोरग्राउंड में शुरू करता है, जहाँ वह नतीजे का इंतज़ार करता है, या बैकग्राउंड में ID के साथ। फिर वह प्रगति पढ़ता है, समय सीमा के साथ इंतज़ार करता है या आपके कहने पर जॉब रोकता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Background Jobs
Tools
yao_job_start— Start a command.background false(default) blocks until done and returnsoutput_tail;background truereturnsjob_idimmediately.yao_job_list— List jobs. Supports--statusfilter and--limit/--offsetpagination.yao_job_get— Get full details for a job (or daemon by ID).yao_job_output— Read process output (works for both job and daemon IDs).yao_job_wait— Block until a background job finishes or timeout expires. Jobs only, not daemons.yao_job_stop— Kill a running job.
Parameters
yao_job_start
| Param | Required | Default | Description |
|---|---|---|---|
command |
yes | — | Shell command to execute |
description |
yes | — | Concise 5–10 word summary |
background |
no | false |
true returns immediately; false blocks until done |
args |
no | — | Additional arguments (rarely needed; prefer inline in command) |
working_dir |
no | workspace | Working directory |
max_duration_ms |
no | — | Kill the job after this many milliseconds |
yao_job_list
| Param | Default | Description |
|---|---|---|
status |
all | Filter: running, stopping, completed, failed, cancelled, all |
limit |
20 | Max items per page |
offset |
0 | Skip first N items |
yao_job_output
| Param | Required | Description |
|---|---|---|
job_id |
yes | Job or daemon ID |
offset |
no | Byte offset to read from (0 = beginning) |
Output read behavior:
- Returns all available content from
offsetin a single read (nolimitparameter). - Ring buffer caps at 10 MB; older content beyond this is discarded.
- When content has been discarded,
lossy=truein the response. size= total bytes the process has produced;offset= earliest readable byte position.- Example: a 20 MB output has
size=20000000, offset≈10000000, lossy=true— the first ~10 MB was discarded.
yao_job_wait
| Param | Required | Default | Description |
|---|---|---|---|
job_id |
yes | — | Job ID |
timeout_ms |
no | 60000 | Timeout in milliseconds |
Response Fields
All responses are JSON. Job objects contain:
id, kind, session_id, status, description, background,
command, command_argv, command_line, pid, pgid, user,
started_at, finished_at, duration_ms, exit_code, signal, detail, seq
Foreground start (background=false)
Returns the job object plus output_tail (≤4KB tail of stdout+stderr):
{ "id": "job_...", "status": "completed", "exit_code": 0, ..., "output_tail": "hello world\n" }
List (paginated)
{ "jobs": [...], "total": 130, "offset": 0, "limit": 20, "has_more": true }
Wait
{ "job": { ... }, "timed_out": false }
Stop (already terminal)
{ "job": { ... }, "detail": "already in terminal state (failed); no action taken" }
Errors
Structured JSON with code and message:
{ "error": { "code": "invalid_argument", "message": "job_id is required" } }
Codes: invalid_argument, not_found, internal.
Usage Rules
- Use
background true(not bare--background) for commands expected to run longer than 30 seconds. - Always provide a
description. - Foreground is default — the result and output come back in one call.
- Monitor background output with
yao_job_outputto check progress. - Use
yao_job_waitto block until a background job completes rather than polling.
BackgroundJobReceipt
When a background job finishes, the system delivers a <BackgroundJobReceipt> XML message. Upon receiving it:
- Review the
status,exit_code,cause, andoutput_tail. - If
status=failed, investigate and take corrective action. - If
status=completed, acknowledge and continue the task.
अक्सर पूछे जाने वाले सवाल
क्या चल रहे जॉब को रोका जा सकता है?
हाँ। एजेंट चल रहे जॉब को रोक सकता है।
क्या जॉब का समय खत्म हो सकता है?
हाँ। आप अधिकतम अवधि तय कर सकते हैं, जिसके बाद जॉब रोक दिया जाता है।
आउटपुट कैसे देखूँ?
एजेंट जॉब का आउटपुट पढ़ता है और जॉब खत्म होने पर आखिरी कुछ लाइनें दिखा सकता है।
जानकारी
लेखक का मूल विवरण
Background job management — start, monitor, wait, stop long-running commands. ALWAYS invoke this skill when the user asks to run background tasks, check job status, read job output, or manage long-running commands.
repo: YaoApp/yao
लोकप्रियता
- GitHub स्टार
- 8.3k
- रैंकिंग में स्थान
- #12476
- लाइसेंस
- —
- अपडेट की गई
- 19/10/2026
कमेंट
- …
इस repository की और skills
yao-agent
8.3kयह आपके एजेंट को Yao होस्ट पर एजेंट्स सूचीबद्ध करने, उनका कोड खोजने या डाउनलोड करने, बदलाव तैनात करने और model connectors की सूची जांचने में मदद करती है।
yao-audio
8.3kयह आपके एजेंट को मीटिंग रिकॉर्डिंग जैसी ऑडियो फ़ाइलों की बातचीत को लिखित टेक्स्ट में बदलने में मदद करती है।
yao-board
8.3kयह आपके एजेंट को Yao प्लेटफ़ॉर्म पर कानबन बोर्ड और टास्क की स्थिति जाँचने में मदद करती है, ताकि वह अंदाज़ा नहीं, असली प्रगति बताए।
yao-daemon
8.3kयह आपके एजेंट को डेवलपमेंट सर्वर जैसी लंबे समय तक चलने वाली बैकग्राउंड सेवाएँ शुरू करने, जाँचने, रीस्टार्ट करने और रोकने में मदद करती है।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।