Best use case

cron is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

## Overview

Teams using cron should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/cron/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/TerminalSkills/skills/cron/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/cron/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How cron Compares

Feature / AgentcronStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

## Overview

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# cron

## Overview

cron is the standard Unix task scheduler. Define schedules with cron expressions (minute, hour, day, month, weekday) to run scripts automatically. Used for backups, log rotation, data sync, health checks, and any recurring task.

## Instructions

### Step 1: Crontab Basics

```bash
# Edit your crontab
crontab -e

# Format: minute hour day month weekday command
# ┌─── minute (0-59)
# │ ┌─── hour (0-23)
# │ │ ┌─── day of month (1-31)
# │ │ │ ┌─── month (1-12)
# │ │ │ │ ┌─── day of week (0-7, 0=Sun)
# │ │ │ │ │
# * * * * * command
```

### Step 2: Common Schedules

```bash
# Every day at 3 AM
0 3 * * * /opt/scripts/backup.sh

# Every hour
0 * * * * /opt/scripts/health-check.sh

# Every 15 minutes
*/15 * * * * /opt/scripts/sync-data.sh

# Monday to Friday at 9 AM
0 9 * * 1-5 /opt/scripts/daily-report.sh

# First day of every month at midnight
0 0 1 * * /opt/scripts/monthly-cleanup.sh

# Every Sunday at 2 AM
0 2 * * 0 /opt/scripts/weekly-maintenance.sh
```

### Step 3: Best Practices

```bash
# Always redirect output to a log file
0 3 * * * /opt/scripts/backup.sh >> /var/log/backup.log 2>&1

# Use full paths (cron has minimal PATH)
0 * * * * /usr/bin/node /opt/app/scripts/job.js

# Set environment variables
MAILTO=admin@example.com
PATH=/usr/local/bin:/usr/bin:/bin
SHELL=/bin/bash

0 3 * * * /opt/scripts/backup.sh
```

### Step 4: System Cron (root tasks)

```bash
# /etc/cron.d/app-maintenance — System-level cron file
SHELL=/bin/bash
PATH=/usr/local/bin:/usr/bin:/bin

# Database backup as postgres user
0 3 * * * postgres pg_dump myapp > /backups/myapp-$(date +\%Y\%m\%d).sql

# Log rotation
0 0 * * * root /usr/sbin/logrotate /etc/logrotate.conf
```

## Guidelines

- Always use full paths in cron — the PATH is minimal.
- Redirect output to log files or `/dev/null` — unhandled output gets emailed.
- Use `crontab -l` to list, `crontab -e` to edit, `crontab -r` to remove all (careful!).
- For modern alternative with dependency tracking, use systemd timers.
- Test commands manually before putting them in cron.

Related Skills

cron-job-scheduler

25
from ComeOnOliver/skillshub

Cron Job Scheduler - Auto-activating skill for Backend Development. Triggers on: cron job scheduler, cron job scheduler Part of the Backend Development skill category.

cron-manager

25
from ComeOnOliver/skillshub

定时任务管理。创建、查看、修改、删除定时任务,管理任务会话数据。当用户需要设置提醒、定时执行任务、管理调度计划时使用。

Cron Mastery

25
from ComeOnOliver/skillshub

**Rule #1: Heartbeats drift. Cron is precise.**

Daily Logs

25
from ComeOnOliver/skillshub

Record the user's daily activities, progress, decisions, and learnings in a structured, chronological format.

Socratic Method: The Dialectic Engine

25
from ComeOnOliver/skillshub

This skill transforms Claude into a Socratic agent — a cognitive partner who guides

Sokratische Methode: Die Dialektik-Maschine

25
from ComeOnOliver/skillshub

Dieser Skill verwandelt Claude in einen sokratischen Agenten — einen kognitiven Partner, der Nutzende durch systematisches Fragen zur Wissensentdeckung führt, anstatt direkt zu instruieren.

College Football Data (CFB)

25
from ComeOnOliver/skillshub

Before writing queries, consult `references/api-reference.md` for endpoints, conference IDs, team IDs, and data shapes.

College Basketball Data (CBB)

25
from ComeOnOliver/skillshub

Before writing queries, consult `references/api-reference.md` for endpoints, conference IDs, team IDs, and data shapes.

Betting Analysis

25
from ComeOnOliver/skillshub

Before writing queries, consult `references/api-reference.md` for odds formats, command parameters, and key concepts.

Research Proposal Generator

25
from ComeOnOliver/skillshub

Generate high-quality academic research proposals for PhD applications following Nature Reviews-style academic writing conventions.

Paper Slide Deck Generator

25
from ComeOnOliver/skillshub

Transform academic papers and content into professional slide deck images with automatic figure extraction.

Medical Imaging AI Literature Review Skill

25
from ComeOnOliver/skillshub

Write comprehensive literature reviews following a systematic 7-phase workflow.