com um clique
creating-jobs
// Create and configure agent-cron job files from natural language descriptions.
// Create and configure agent-cron job files from natural language descriptions.
Start, stop, restart, and check the status of the agent-cron daemon. Use when you need to manage the daemon lifecycle, check if the daemon is running, restart after config changes, or troubleshoot daemon startup issues.
Edit and delete existing agent-cron job files through natural language conversation.
Install, configure, and verify the agent-cron daemon.
Monitor job execution, view history, check logs, diagnose failures, and review aggregate statistics for agent-cron scheduled jobs. Use when asked about job status, execution results, or failures.
Execute a universal CLOD agent definition and orchestrate referenced skills.
| name | creating-jobs |
| description | Create and configure agent-cron job files from natural language descriptions. |
| last_validated | "2026-03-21T00:00:00.000Z" |
This skill guides users through creating agent-cron job files from natural language task descriptions. It covers the full workflow: understanding the user's intent, generating a cron schedule, selecting the right adapter and model, assembling a valid job file, validating it, and writing it to disk only after explicit confirmation.
Verify that agent-cron is installed and the project is initialized before proceeding.
Check for the agcron binary:
which agcron
If agcron is not found, direct the user to the installing-agcron skill to install it first. Do not continue until the binary is available.
Check for the jobs directory:
ls .cron/jobs/
If .cron/jobs/ does not exist, run agcron init to scaffold the project:
agcron init
Confirm both checks pass before continuing.
For users who want a ready-made template rather than a guided flow, point them to references/job-templates.md. Four templates are available:
Tell the user to copy any template from references/job-templates.md into .cron/jobs/ and customize the fields. If they want a custom job instead, proceed to the guided flow below.
Follow these steps in order. Do not skip steps. Do not write the file until the user confirms.
Ask the user what they want their cron job to do. Gather three pieces of information:
references/adapter-model-reference.md.If the user provides all three in their initial message, acknowledge each one and move to Step 2. If any are missing, ask follow-up questions to fill the gaps.
Translate the user's schedule description into a standard 5-field cron expression. Always present both the expression and a human-readable explanation.
Example format:
Schedule:
0 9 * * 1-5This means: At 9:00 AM, Monday through Friday.
For cron expression syntax details, refer to references/cron-cheatsheet.md.
Apply these scheduling best practices:
If the schedule is ambiguous, ask for clarification. Do not guess.
Recommend an adapter and model based on the task type. Use the task-type recommendations from references/adapter-model-reference.md:
claude with claude-sonnet-4-20250514claude with claude-opus-4-20250514codex with o3-minigemini with gemini-2.5-procodex with o4-miniPresent the recommendation to the user and let them override either the adapter or the model. Use the field name agent: (not agent_cli: which is deprecated).
Optionally suggest a fallback adapter and model. Explain that the fallback is used if the primary adapter fails.
Assemble the complete job markdown file. The file has two parts: YAML frontmatter and a markdown prompt body.
Derive the id from the task description. The ID must be slug-safe: lowercase letters, digits, and hyphens only ([a-z0-9-]+). Examples: pr-review, nightly-tests, weekly-security-scan.
Important: The daemon uses the filename (minus .md) as the runtime job identifier, not the frontmatter id field. Always name the file .cron/jobs/{id}.md so the filename matches the id value. This ensures consistency between the frontmatter metadata and how the daemon references the job in logs, status, and RPC calls.
Include these frontmatter fields:
true for cron jobs so they run unattended. Add a note that this means the agent can execute commands without manual approval, and the user should ensure the prompt is safe.Optional fields to include when relevant:
Generate the prompt body as markdown content after the closing ---. The prompt should be clear, actionable instructions for the AI agent. Structure it with numbered steps where appropriate.
Before showing the file to the user, validate all of the following:
*), lists (,), ranges (-), and steps (/) are valid.claude, codex, gemini, opencode, copilot) or noted as a custom adapter.[a-z0-9-]+ with no uppercase, spaces, or special characters..cron/jobs/{id}.md already exists:test -f .cron/jobs/{id}.md && echo "EXISTS" || echo "OK"
If the file already exists, warn the user and ask whether to overwrite or choose a different ID.
If any validation fails, fix the issue and re-validate before proceeding.
Display the complete file content to the user in a fenced code block. Show the full file exactly as it will be written, including the YAML frontmatter and the prompt body.
After the code block, restate the schedule explanation in human-readable form:
This job will run: [human-readable schedule description].
Ask the user to confirm the file is correct or request changes. Accept responses like "looks good", "yes", "confirm", or "write it".
If the user requests changes, go back to the relevant step, make the changes, re-validate, and show the updated file again.
Never write the file without explicit user confirmation. This is the show-before-write checkpoint. Do not skip it.
After the user confirms, write the file:
cat > .cron/jobs/{id}.md << 'JOBEOF'
{complete file content}
JOBEOF
Verify the file was written:
test -f .cron/jobs/{id}.md && echo "Job file created successfully." || echo "ERROR: File was not created."
After successful creation, suggest next steps:
agcron daemon -dagcron jobs listagcron statusAll valid frontmatter fields for job files:
| Field | Type | Required | Default | Constraints |
|---|---|---|---|---|
id | string | recommended | filename stem | Slug-safe: [a-z0-9-]+. Must match filename. |
description | string | recommended | -- | One-line summary |
schedule | string | recommended | config default | 5-field cron expression |
agent | string | recommended | config default | Built-in adapter name or custom |
model | string | no | config default | Valid model name for the chosen adapter |
timeout | integer | no | 300 | Seconds, must be > 0 |
timezone | string | no | system TZ | IANA timezone, e.g. America/New_York |
auto_approve | boolean | no | false | Allow unattended command execution |
max_retries | integer | no | 2 | Retry attempts on failure, >= 0 |
fallback_agent | string | no | -- | Backup adapter if primary fails |
fallback_model | string | no | -- | Model for the fallback adapter |
extends | string | no | -- | Base template ID to inherit from |
tags | list | no | [] | Descriptive labels for categorization |
When helping users choose a schedule, apply these guidelines:
0 0 * * * is the most common cron time. Suggest 2:00-5:00 AM with a non-zero minute offset.references/cron-cheatsheet.md -- Cron expression syntax, field ranges, special characters, common patterns, and scheduling best practices.references/adapter-model-reference.md -- Built-in adapter details, task-type recommendations, model names, and field name deprecation notes.references/job-templates.md -- Four ready-to-use job templates (PR review, test runner, security scan, doc refresh) with customization tips.