Cron Expression Parser & Builder - Crontab Guru Alternative
Parse, explain, and build cron expressions visually. See next execution times, get human-readable descriptions, and validate crontab syntax online.
Frequently Asked Questions
What is a cron expression?
A cron expression is a string consisting of 5-7 fields that represent a schedule for executing tasks. Originally used in Unix-like systems for scheduling cron jobs, this syntax is now widely used in cloud services (AWS, Azure, GCP), CI/CD pipelines, and application frameworks. Each field specifies when the task should run: minute, hour, day of month, month, and day of week.
How do I use this cron parser tool?
Enter your cron expression in the input field (e.g., 0 9 * * 1-5). The tool instantly parses and displays a human-readable description and the next scheduled execution times. Use the presets dropdown for common schedules. Switch to the Build tab to create expressions visually by selecting values for each field.
Is my cron expression data safe?
Yes. Your cron expressions are 100% safe and never leave your browser. All parsing and calculation is performed client-side using JavaScript. No data is transmitted to any server, making this tool safe for any scheduling patterns you need to test.
What is the difference between standard and extended cron format?
Standard Unix cron uses 5 fields: minute, hour, day of month, month, and day of week. The extended format adds a seconds field at the beginning for 6 fields total. Some systems like Quartz (Java) use a 7-field format that also includes year. This tool supports both standard 5-field and extended 6-field formats.
Why are there two day fields (day of month and day of week)?
You can specify either or both. When both are specified with non-wildcard values, the job runs when EITHER condition is met (not both). For example, '0 9 15 * 1' means '9 AM on the 15th of each month OR any Monday' — not '9 AM on the 15th if it's a Monday.'
How do I create a cron expression for 'every 5 minutes'?
Use */5 * * * *. The /5 means 'every 5th value.' Similarly, */15 * * * * runs every 15 minutes, and 0 */2 * * * runs every 2 hours at minute 0.
What time zone does cron use?
By default, cron uses the system's local time zone. In cloud services, you can often specify a timezone. This tool shows next execution times in your browser's local timezone.
Code Examples
// Simple cron expression parser
function parseCronExpression(expression) {
const parts = expression.trim().split(/\s+/);
if (parts.length !== 5) {
throw new Error('Invalid cron expression: expected 5 fields');
}
const [minute, hour, dayOfMonth, month, dayOfWeek] = parts;
function parseField(field, min, max) {
if (field === '*') {
return Array.from({ length: max - min + 1 }, (_, i) => min + i);
}
const values = new Set();
field.split(',').forEach(part => {
if (part.includes('/')) {
const [range, step] = part.split('/');
const stepNum = parseInt(step, 10);
let start = min, end = max;
if (range !== '*' && range.includes('-')) {
[start, end] = range.split('-').map(Number);
}
for (let i = start; i <= end; i += stepNum) values.add(i);
} else if (part.includes('-')) {
const [start, end] = part.split('-').map(Number);
for (let i = start; i <= end; i++) values.add(i);
} else {
values.add(parseInt(part, 10));
}
});
return Array.from(values).sort((a, b) => a - b);
}
return {
minute: parseField(minute, 0, 59),
hour: parseField(hour, 0, 23),
dayOfMonth: parseField(dayOfMonth, 1, 31),
month: parseField(month, 1, 12),
dayOfWeek: parseField(dayOfWeek, 0, 6),
};
}
// Example usage
const expr = '0 9 * * 1-5';
console.log('Parsed:', parseCronExpression(expr));