wp-plugin-cron

wp-plugin-cron is a skill for Claude Code, Codex from Lonsdale201/wp-agent-skills. It costs 101 tokens per session (3,699 once invoked), scanned A, original, MIT.

A guide to scheduling recurring or background work in WordPress plugins. It explains WP-Cron, WordPress's request-triggered scheduler, and related job-queue patterns.

In plain words
What is it for?
It supports periodic API syncs, cleanup tasks, delayed emails, webhook retries, multisite schedules, and other deferred work.
Why use it?
It helps prevent scheduled tasks from running repeatedly, late, or not at all, and covers safe cleanup when a plugin is disabled.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It supports periodic API syncs, cleanup tasks, delayed emails, webhook retries, multisite schedules, and other deferred work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lonsdale201/wp-agent-skills/wp-plugin-cron
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Lonsdale201/wp-agent-skills --skill wp-plugin-cron
Clone the repo
git clone --depth 1 https://github.com/Lonsdale201/wp-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wp-plugin-cron

README.md
[![agentmods](https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wp-plugin-cron/github.svg)](https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wp-plugin-cron)
Your own site
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wp-plugin-cron"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wp-plugin-cron/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wp-plugin-cron

Your own site · 80×15
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wp-plugin-cron"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wp-plugin-cron.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,699 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00101 $0.03699
Opus 5 $0.00051 $0.01850
Sonnet 5 $0.00020 $0.00740
Haiku 4.5 $0.00010 $0.00370

Measured 9d ago against content hash 1e1d491651e6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

wp-plugin-cron scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

* * * * * curl -s https://example.com/wp-cron.php > /dev/null 2>&1
plugin-scaffold/wp-plugin-cron/SKILL.md · 270 lines

How it starts

The opening of the file, as written. The whole thing — 270 lines — stays where its author put it; the contents beside it link to each section on GitHub.

WordPress plugin: cron & background jobs

Scheduled work — daily cleanup, periodic API sync, deferred email send, retry on failed webhook delivery — is a normal part of plugin life. WordPress ships its own cron primitive (wp_schedule_event), and the WooCommerce-bundled Action Scheduler library extends the model into a proper queue. Picking between them and using the chosen one correctly is what this skill covers.

When to use this skill

Trigger when ANY of the following is true:

  • Scheduling a periodic task (daily option cleanup, hourly token refresh, weekly digest email).
  • Deferring work off the request thread (e.g. send email after the form submission returns).
  • Debugging "my cron event was registered but never fires" or "fires multiple times" or "fires hours late".
  • Deciding between native WP cron and Action Scheduler for a non-trivial background workload.
  • Reviewing a plugin's activation / deactivation hooks for cron schedule + clear correctness.

Mental model — WP cron is pseudo-cron, not real cron

WordPress cron does NOT run on a system schedule. There is no cron daemon waking WP up. Instead:

  1. Page request comes in.
  2. On init, WordPress calls wp_cron() (wp-includes/default-filters.php).
  3. Since WP 6.9, wp_cron() registers _wp_cron() on shutdown for normal requests, so the cron spawn does not hurt TTFB as much. With ALTERNATE_WP_CRON, it still uses wp_loaded.
  4. _wp_cron() checks for due events and makes a non-blocking loopback request to /wp-cron.php, which actually runs the due events.

In WordPress 7.1, the cron spawn passes its resolved cron URL as the second argument to https_local_ssl_verify. Existing one-argument callbacks continue to work, while a filter that needs host-specific local TLS policy can register for two arguments. Keep verification exceptions exact and development/host specific; do not disable TLS verification globally for cron.

Implications:

  • No traffic = no cron. A site with 5 visitors/day fires cron events 5 times/day, max. A "daily" event on a low-traffic site might run every 3 days.
  • Late firing is normal. An "hourly" event scheduled at noon may fire at 12:47 if that's when the next visitor lands.
  • Concurrent visitors can race. WP has internal locking but it's best-effort; on a busy site, two requests may both attempt to spawn the same event before the lock takes effect.
  • Long-running events block the loopback. If your daily_cleanup callback runs 90 seconds, the wp-cron.php request takes 90 seconds. Other due events in that batch wait.

Read the full file on GitHub · 270 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 270 lines · 101 tokens per session scan A 1e1d491651e6

Subscribe to this mod's changes

wp-plugin-cron is a skill published in the GitHub repository Lonsdale201/wp-agent-skills (22 stars, last pushed 2d ago), licensed MIT. It adds 101 tokens to every session and 3,699 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

astro-github-actions

Sets up GitHub Actions CI/CD workflows for Astro sites — astro check (TypeScript + content schema), ESLint, Prettier, build verification, Vitest testing, Lighthouse CI, link checking, npm audit, and automated deployment to GitHub Pages, Cloudflare Pages, Netlify, or Vercel. ALWAYS use this skill when a user wants to…

jdevalk/skills · 304 tokens

wp-github-actions

Sets up GitHub Actions CI/CD workflows for WordPress plugins — coding standards (WPCS/PHPCS), PHP/JS/CSS linting, PHPUnit testing, static analysis (PHPStan), Composer security scanning, WordPress Playground PR previews, and automated deployment to WordPress.org. ALWAYS use this skill when a user wants to create, add…

jdevalk/skills · 293 tokens

emdash-github-actions

Sets up GitHub Actions CI/CD workflows for EmDash plugins — TypeScript type-checking, ESLint linting, Vitest testing, npm publishing, and automated releases. ALWAYS use this skill when a user wants to create, add, set up, or configure GitHub Actions, CI/CD, automated checks, or deployment workflows for an EmDash…

jdevalk/skills · 234 tokens

ci-cd-and-automation

Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies.

addyosmani/agent-skills · 45 tokens

google-cloud-slo-alert-configuration

Configures PromQL-based Service Level Objective (SLO) alerting policies for Google Cloud resources registered in App Hub or individually specified. Generates Terraform output. Use when the user asks to configure an SLO or Service Level Objective. Don't use for standard alerting policies.

google/skills · 62 tokens

chinese-git-workflow

A reference for configuring Git with Chinese code-hosting services such as Gitee, Coding.net, GitLab China, and CNB, including SSH, HTTPS, credentials, CI, and repository mirroring.

jnMetaCode/superpowers-zh · 69 tokens