wait-for-job

Poll shell commands until exit codes or regex patterns signal completion.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/olliecrow/codex --skill wait-for-job
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wait-for-job
Source: https://github.com/olliecrow/codex/tree/main/skills/wait-for-job
Command: npx skills add https://github.com/olliecrow/codex --skill wait-for-job

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and agents (resource) components.

What problem does it solve?

This Skill prevents Codex from proceeding until long-running external tasks, such as cluster jobs or batch pipelines, have successfully completed, ensuring downstream processes have the necessary prerequisites.

Core Features & Use Cases

  • Asynchronous Task Monitoring: Polls the status of external jobs at a configurable interval.
  • Flexible Completion Criteria: Supports completion based on command exit codes or output matching specific regular expressions.
  • Robust Timeout and Retry Logic: Includes hard timeout caps and handles transient transport failures with retries.
  • Use Case: You've submitted a large data processing job to a cluster. Use this Skill to pause your workflow until the job is done, then automatically proceed with analyzing the results.

Quick Start

Use the wait-for-job skill to poll the command 'kubectl get job my-job -n my-namespace -o jsonpath='{.status.conditions[*].type}'' for the 'Complete' status, checking every 120 seconds.

Frequently Asked Questions about wait-for-job

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I block workflow execution until an asynchronous cluster job finishes?

Block workflow execution by polling a shell command that monitors the asynchronous cluster job's status at a configurable interval until a completion signal is detected or a timeout is reached.

What is the best way to monitor long-running external tasks and trigger downstream processes automatically?

Monitor long-running external tasks by polling a shell command to check job status, ensuring downstream processes only trigger after the task successfully completes.

Can I detect task completion using regex pattern matching instead of exit codes?

Detect task completion using either command exit codes or output matching specific regular expressions, providing flexible success and failure detection criteria for polled commands.

Does job monitoring handle transient transport failures during polling?

Job monitoring handles transient transport failures during polling by implementing retry logic, while also enforcing hard timeout caps to prevent indefinite blocking.

How do I check Kubernetes job status for completion using command-line polling?

Check Kubernetes job completion by polling a kubectl command that queries the job's status conditions, configuring the polling interval to inspect the output for a Complete status indicator.