devkits-cron
v1.0.3
Published
Parse and explain cron expressions — understand cron schedules in plain English
Maintainers
Readme
devkits-cron
Parse and explain cron expressions in plain English. See next run times.
Install
npm install -g devkits-cronUsage
CLI
# Parse and explain a cron expression
cronparse "*/5 * * * *"
# Output: Every 5 minutes
# Show next run times
cronparse "0 9 * * 1-5" --next 10
# Common aliases work too
cronparse "@daily"
cronparse "@weekly" --next
# Show examples
cronparse --examplesProgrammatic API
const { parse, getNextRuns, describe } = require('devkits-cron');
// Parse expression
const result = parse('0 9 * * 1-5');
console.log(result.description); // "At 09:00, on Monday-Friday"
// Get next run times
const { runs } = getNextRuns('0 0 1 * *', 5);
runs.forEach(r => console.log(r)); // Array of Date objects
// Full description
describe('*/15 * * * *'); // { description: "Every 15 minutes" }Cron Expression Format
┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12, JAN-DEC)
│ │ │ │ ┌───────────── day of week (0-6, SUN-SAT)
│ │ │ │ │
* * * * *Special Characters
| Character | Meaning | Example |
|-----------|---------|---------|
| * | All values | * * * * * (every minute) |
| , | List separator | 1,15,30 * * * * |
| - | Range | 0 9-17 * * * (9 AM to 5 PM) |
| / | Step values | */5 * * * * (every 5 min) |
Predefined Schedules
| Alias | Expression | Meaning |
|-------|------------|---------|
| @yearly | 0 0 1 1 * | Once a year |
| @monthly | 0 0 1 * * | Once a month |
| @weekly | 0 0 * * 0 | Once a week |
| @daily | 0 0 * * * | Once a day |
| @hourly | 0 * * * * | Once an hour |
Examples
# Every 5 minutes
$ cronparse "*/5 * * * *"
Every 5 minutes
# Weekdays at 9 AM
$ cronparse "0 9 * * 1-5"
At 09:00, on Monday-Friday
# First of every month at midnight
$ cronparse "0 0 1 * *" --next 3
Next 3 run times:
1. Mon 2026-03-01 00:00
2. Wed 2026-04-01 00:00
3. Fri 2026-05-01 00:00
# Every 15 minutes on weekdays 9 AM - 5 PM
$ cronparse "*/15 9-17 * * 1-5"
At minute */15 between 09:00-17:00, on Monday-FridayUse Cases
- Cron jobs — Verify scheduled task schedules
- GitHub Actions — Validate workflow schedules
- CI/CD pipelines — Plan build schedules
- System administration — Document crontab entries
- Kubernetes CronJobs — Design pod schedules
Related Tools
🔍 Build something amazing? Check out API Monitor — simple, affordable API monitoring for indie hackers. Get alerted before your customers notice. Just $9/mo.
See Also
- DevKits — All 82 free developer tools in one place
- JSON Formatter — Format and validate JSON
- Base64 Encoder — Encode/decode Base64
- JWT Decoder — Decode JWT tokens
- UUID Generator — Generate UUIDs
- Hash Generator — Create MD5, SHA1, SHA256 hashes
- CSS Tools — CSS minifier, formatter, validator
- HTML Tools — HTML formatter, minifier
- URL Tools — URL encode/decode, parse
- Color Converter — Convert HEX, RGB, HSL colors
- Regex Tester — Test and debug regular expressions
Support DevKits
If you find this tool useful, please consider supporting the project:
Open Collective
Become a sponsor: Open Collective - DevKits
Crypto Donations
Prefer crypto? We accept:
- ETH (Ethereum):
0xDea4a6A20fCB44467e45Ef378972F54B22dC59db - USDC (ERC-20):
0xDea4a6A20fCB44467e45Ef378972F54B22dC59db
Donation Perks:
- $5+ — Supporter Badge
- $10+ — Pro Access (1 month)
- $29+ — Pro Access (1 year)
- $100+ — Lifetime Pro + Priority Support
After donating, email your transaction hash to [email protected] to claim perks.
License
MIT — DevKits Team
