Skip to content
Back to skills

Add Cron

ASecurity

Add a scheduled job to headless-ops: one file in server/src/crons. Use when asked to "add a cron", "run X every day", or "check Y every hour".

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 1, 2026
ai-agentsapi

Works with

  • api

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add asteroidai/headless-ops --skill add-cron --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Add Cron?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Add Cron
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/asteroidai-add-cron/badge)](https://www.skillsdirectory.com/skills/asteroidai-add-cron)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: add-cron
description: Add a scheduled job to headless-ops: one file in server/src/crons. Use when asked to "add a cron", "run X every day", or "check Y every hour".
---

# add-cron

Ask first: does the job need judgement?

- **No** (a count, a reminder, a sync): the cron does the work in code and calls `ctx.post`. No model runs. Copy `server/src/crons/stale-jobs.ts`.
- **Yes** (rank, research, write): the cron collects the facts in code and calls `ctx.run` with a skill. The agent does the judging. Copy `server/src/crons/daily-digest.ts`.

1. Add `server/src/crons/<name>.ts` with a default export: `name`, `schedule` (five cron fields, in UTC) and `run(ctx)`.
2. Give `ctx.run` a `key` that names the cron and the one run: `<cron name>:<date>` for a daily cron, `<cron name>:<date>-<hour>` for an hourly one. Keys are shared by every hook and cron, so a key with no name can stop another cron's job. A restart inside the same minute then makes no second job, and the next run still makes its own.
3. For a new skill, add `agent/.claude/skills/<skill>/SKILL.md`.
4. Add a test to `test/server.test.ts` with `runCron`.
5. Run `pnpm test && pnpm typecheck`.

To run it now on a live server: `POST /api/crons/<name>/run`, as a person.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.