agentleFS
julismanjulisman/virtual-worker/skills/ops/scheduled-job-doctor/SKILL.md

Scheduled Job Doctor

Skill0 starsChanged 30 days agoApache-2.0View on GitHub

Diagnose and fix a misfiring scheduled run — inspect the schedule spec and last outcomes, find why it fails (bad cron, ambiguous prompt, missing tool/target), rewrite the prompt to be self-contained, and recreate the schedule.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before user approval, end at the New: line with "Apply this?" instead of Applied:.

    line 41
  2. Very specific:

    Never schedule_delete without the user's OK on the replacement — a deleted schedule with no replacement is a silent outage.

    line 45
  3. Distinctive:

    Do not invent last-run history.

    line 47
  4. Distinctive:

    If the root cause is a missing tool (no chat channel, shell off, MCP detached), fixing the prompt won't help — tell the user what to …

    line 48
  5. Distinctive:

    Prefer the simplest cron that matches intent.

    line 49
  6. Distinctive:

    If a run needs the current date, make the prompt say "use today's actual date" — never bake a stale example date into a recurring prompt.

    line 50

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Scheduled Job Doctor

Find why a scheduled run misbehaves, then replace it with a schedule that runs itself correctly with zero chat context.

Inputs

  • Which job — the user names it, or you find it via schedule_list. Default: the job the user is complaining about; if ambiguous, list and ask.
  • User timezone — ask if unknown; needed to talk about run times honestly.

Steps

  1. schedule_list and locate the job. Capture its spec verbatim: cron or one-time time, the prompt text, and any recorded last-run outcomes.
  2. Diagnose against the common failure classes, in order:
    • Bad cron — invalid field, or a cron that means something else than intended (e.g. 0 9 * * 1 is Mondays, not daily; * * * * * is every minute). Expand the cron to plain words and compare with what the user wanted.
    • Timezone drift — the schedule fires in server time but the user reasons in their local time; compute both.
    • Ambiguous prompt — the prompt leans on chat context that a cold run doesn't have: "check the page again", "send it to him", "the usual report". A scheduled prompt must name its URL/target/format explicitly.
    • Missing tool or target — the prompt needs a tool the agent lacks (shell off, no chat channel, no MCP attached) or a delivery target that no longer resolves. Check the prompt's verbs against the agent's actual tools.
    • One-time already fired — a one-time schedule in the past will never run again; it needs recreating, not fixing.
  3. Rewrite the prompt to be self-contained: every URL, target ID, file path, format, and delivery channel spelled out inside the prompt; absolute descriptions instead of "again/the usual"; an explicit "if X fails, report the error via deliver(...)" clause.
  4. Show the user the diagnosis plus the before/after (old spec → new cron + new prompt) and get their OK.
  5. On OK: schedule_delete the broken job, then schedule_create the fixed one. Delete-then-create, never leave both firing.
  6. schedule_list again to verify the new job exists, and compute the next run time in the user's timezone; state it as an absolute date-time.

Output format

Schedule doctor — <job name/id>
Diagnosis: <failure class> — <one-line specifics>
Old:  cron <expr> ("<in words>") · prompt: "<old prompt>"
New:  cron <expr> ("<in words>") · prompt: "<new prompt>"
Applied: deleted old, created new. Next run: <weekday YYYY-MM-DD HH:MM> (<user tz>).

Before user approval, end at the New: line with "Apply this?" instead of Applied:.

Rules

  • Never schedule_delete without the user's OK on the replacement — a deleted schedule with no replacement is a silent outage.
  • Fix one job per confirmation; for a full cleanup, present a table of all jobs with per-job diagnoses and fix them one at a time.
  • Do not invent last-run history; if outcomes aren't recorded, say "no run history available" and diagnose from the spec alone.
  • If the root cause is a missing tool (no chat channel, shell off, MCP detached), fixing the prompt won't help — tell the user what to enable/connect first, and only then recreate the job.
  • Prefer the simplest cron that matches intent; explain any cron you write in plain words so the user can veto it.
  • If a run needs the current date, make the prompt say "use today's actual date" — never bake a stale example date into a recurring prompt.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.