# Cron job test author

> Cron job test author is an open-source agent skill for developer tools. Gives your agent a checklist and test recipes for cron and scheduled job tests. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/testland/qa/tree/main/plugins/qa-async-jobs/skills/cron-job-test-author
- **Repository:** https://github.com/testland/qa
- **GitHub stars:** 18
- **License:** MIT
- **Skill name:** cron-job-test-author
- **Collection:** https://github.com/testland/qa
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill guides an agent through writing tests for time-scheduled jobs across Unix cron, Kubernetes CronJobs, BullMQ repeat jobs, Sidekiq, APScheduler, Quartz and Hangfire. It walks through validating cron expressions, checking next-run times around daylight saving transitions and leap days, deciding how missed runs are handled after downtime, and testing overlap locks with stale-lock recovery.

The guidance is organized as a per-job checklist. It recommends parsing expressions with croniter or a language-native validator, computing fire times against IANA time zones, and making timezone choices explicit through settings such as Kubernetes timeZone or BullMQ tz. It also covers idempotency of repeated runs and advises moving schedules to UTC where practical.

Examples are written in Python with pytest, croniter and zoneinfo, with Kubernetes YAML and BullMQ TypeScript snippets. Lock tests reference an fcntl-based pattern in a separate reference file.

## When your agent uses it

> Use when cron jobs, Kubernetes CronJobs, BullMQ repeat jobs, Sidekiq schedules or any time-based job need tests: cron expression validation, DST and leap-day edge cases, catch-up after downtime, overlapping-run locks with stale-lock recovery, and time zones.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/testland/qa/tree/HEAD/plugins/qa-async-jobs/skills/cron-job-test-author)
- [License: MIT](https://github.com/testland/qa/tree/HEAD/plugins/qa-async-jobs/skills/cron-job-test-author)

## Features

- **Cron expression validation:** Parametrized checks that known-good and known-bad schedule expressions are accepted or rejected.
- **DST and leap-day tests:** Next-run assertions for spring-forward, fall-back and February 29 edge cases.
- **Missed-run policy checks:** Guidance on Kubernetes startingDeadlineSeconds and how missed schedules behave after downtime.
- **Overlap and stale locks:** Lock-based protection against concurrent runs, with recovery from locks left by crashed jobs.
- **Time zone assertions:** Explicit tests of timezone semantics using croniter, Kubernetes timeZone and BullMQ tz settings.
- **Per-job end-to-end checklist:** A closing checklist covering validity, DST, missed runs, locks, timezone, idempotency and logging.

## Good for

- Write tests that validate a set of cron expressions before deploying them
- Check that a daily 2 AM job behaves correctly on a daylight saving change day
- Test that a long-running scheduled job cannot overlap with its next run
- Add stale-lock recovery so a crashed job does not block future runs
- Review a Kubernetes CronJob for missed-run and time zone settings

## Install

### Claude Code

This skill ships in the `qa-async-jobs` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add testland/qa
/plugin install qa-async-jobs@testland-qa
```

Or copy only this skill to `~/.claude/skills/cron-job-test-author`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/testland/qa.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/cron-job-test-author &&
cp -R "$tmp/plugins/qa-async-jobs/skills/cron-job-test-author" ~/.claude/skills/cron-job-test-author &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/cron-job-test-author` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/cron-job-test-author` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/testland/qa.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/cron-job-test-author &&
cp -R "$tmp/plugins/qa-async-jobs/skills/cron-job-test-author" ~/.agents/skills/cron-job-test-author &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/cron-job-test-author` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/cron-job-test-author` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/testland/qa.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/cron-job-test-author &&
cp -R "$tmp/plugins/qa-async-jobs/skills/cron-job-test-author" ~/.cursor/skills/cron-job-test-author &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/cron-job-test-author` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/testland/qa.git --path plugins/qa-async-jobs/skills/cron-job-test-author
```

Or copy the folder to `~/.gemini/skills/cron-job-test-author` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/cron-job-test-author`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/testland/qa.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/cron-job-test-author &&
cp -R "$tmp/plugins/qa-async-jobs/skills/cron-job-test-author" ~/.copilot/skills/cron-job-test-author &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/cron-job-test-author` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/testland/qa.git
```

Then copy `qa/plugins/qa-async-jobs/skills/cron-job-test-author` into your agent's skills folder as `cron-job-test-author`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Cron job test author need to run?

The examples use Python with pytest, croniter and zoneinfo (Python 3.9+). Other languages can use native validators such as cron-validator for Node or Quartz's expression checker for Java.

### Does Cron job test author run any scripts or change my schedules?

No scripts are included. It provides guidance and test patterns that the agent writes into your project.

### Which schedulers does Cron job test author cover?

Unix cron, Kubernetes CronJobs, BullMQ repeat jobs, Sidekiq schedulers, APScheduler, Quartz and Hangfire.

### Does Cron job test author cover idempotency?

It points to a separate idempotency test skill as a companion, since idempotency is the safe answer to duplicate runs.

### How do I install Cron job test author in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/cron-job-test-author to use it in all your projects, or to .claude/skills/cron-job-test-author in one project. Or install the qa-async-jobs plugin, which includes it: /plugin marketplace add testland/qa, then /plugin install qa-async-jobs@testland-qa.

### Does Cron job test author run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Cron job test author?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Cron job test author?

The closest alternatives to Cron job test author are Agent QA testing, Test driven development, Skill creator, Testing conventions and Testing assistant.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Agent QA testing](https://ai-powered.com/skills/agent-qa-testing): Agent QA testing is an open-source agent skill for developer tools.
- [Test driven development](https://ai-powered.com/skills/test-driven-development-addyosmani): Test driven development is an open-source agent skill for developer tools.
- [Skill creator](https://ai-powered.com/skills/skill-creator): Skill creator is a free agent skill for ai models and llm tooling.
- [Testing conventions](https://ai-powered.com/skills/testing-conventions): Testing conventions is an open-source agent skill for developer tools.
- [Testing assistant](https://ai-powered.com/skills/testing-assistant): Testing assistant is an open-source agent skill for developer tools.
- [Pytest skill](https://ai-powered.com/skills/pytest-skill): Pytest skill is an open-source agent skill for developer tools.
- [Unittest skill](https://ai-powered.com/skills/unittest-skill): Unittest skill is an open-source agent skill for developer tools.
- [Go test quality](https://ai-powered.com/skills/go-test-quality): Go test quality is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/cron-job-test-author
