Skip to main content
The Cron Job Parser tool converts cron schedule expressions into plain English descriptions and calculates the next scheduled run times. It helps developers understand and validate cron schedules used in task automation, job scheduling, and periodic task execution.

Features

  • Human-readable cron expression descriptions
  • Next 5 scheduled run times
  • Standard 5-field cron syntax support
  • Detailed error messages for invalid expressions
  • Handles complex patterns (steps, ranges, lists)

Use Cases

Schedule Validation

Verify cron schedules before deploying automated tasks

Documentation

Generate human-readable descriptions of cron schedules for documentation

Debugging

Understand existing cron jobs and troubleshoot scheduling issues

Planning

Calculate when scheduled tasks will run to plan deployments and maintenance

Cron Syntax

Cron expressions use 5 fields separated by spaces:
minute  hour  day  month  day-of-week

Field Ranges

FieldRangeValues
Minute0-590 = top of hour
Hour0-230 = midnight, 12 = noon
Day1-31Day of month
Month1-121 = January, 12 = December
Day of Week0-70 or 7 = Sunday, 1 = Monday

Special Characters

CharacterMeaningExample
*Any value* * * * * = every minute
,List separator1,15,30 = 1st, 15th, and 30th
-Range1-5 = 1 through 5
/Step*/5 = every 5 units

Input Format

Enter a 5-field cron expression:
0 9 * * 1-5
This tool uses standard 5-field cron syntax. Extended formats with seconds or year fields are not supported.

Actions

Default (Describe)

Generate human-readable description:
At 9:00 AM, Monday through Friday

Next Runs

Calculate the next 5 scheduled executions:
3/5/2026, 9:00:00 AM
3/6/2026, 9:00:00 AM
3/9/2026, 9:00:00 AM
3/10/2026, 9:00:00 AM
3/11/2026, 9:00:00 AM

Examples

Run at 9 AM on weekdays.Expression:
0 9 * * 1-5
Description:
At 9:00 AM, Monday through Friday
Next Runs:
3/5/2026, 9:00:00 AM
3/6/2026, 9:00:00 AM
3/9/2026, 9:00:00 AM
3/10/2026, 9:00:00 AM
3/11/2026, 9:00:00 AM

Implementation Details

From lib/tools/engine.ts:737-752:
case 'cron-parser': {
  const expr = input.trim();
  if (!expr) 
    return { output: 'Enter a cron expression (5 fields: min hour dom mon dow)' };
  
  try {
    const cronstrueMod = await import('cronstrue');
    const cronstrue = cronstrueMod.default || cronstrueMod;
    const description = cronstrue.toString(expr, { 
      throwExceptionOnParseError: true 
    });
    
    if (action === 'next-runs') {
      const runs = getNextCronRuns(expr, 5);
      return { output: runs.join('\n'), meta: description };
    }
    
    return { output: description, meta: `Expression: ${expr}` };
  } catch (e) {
    return { output: e instanceof Error ? e.message : 'Invalid cron expression' };
  }
}

Dependencies

  • cronstrue: Converts cron expressions to human-readable text
  • getNextCronRuns(): Custom implementation calculating future run times

Common Patterns

Every Minute

* * * * *
Description: “Every minute”

Every Hour

0 * * * *
Description: “Every hour”

Every Day at Noon

0 12 * * *
Description: “At 12:00 PM”

Every Sunday

0 0 * * 0
Description: “At 12:00 AM, only on Sunday”

First of Month

0 0 1 * *
Description: “At 12:00 AM, on day 1 of the month”

Every 15 Minutes

*/15 * * * *
Description: “Every 15 minutes”

Weekdays at 6 AM

0 6 * * 1-5
Description: “At 6:00 AM, Monday through Friday”

Weekend Nights

0 22 * * 6,0
Description: “At 10:00 PM, only on Saturday and Sunday”

Step Values

Step syntax: */step or range/step
ExpressionMeaning
*/5 * * * *Every 5 minutes
0 */2 * * *Every 2 hours
0 0 */3 * *Every 3 days
0-30/10 * * * *At minutes 0, 10, 20, 30
0 9-17/2 * * *At 9, 11, 13, 15, 17

Range Expressions

ExpressionMeaning
0-5Values 0 through 5
1-31All days of month
9-17Business hours (9 AM - 5 PM)
1-5Weekdays (Monday-Friday)

List Expressions

ExpressionMeaning
0,15,30,45Specific minutes
1,151st and 15th of month
1,4,7,10Quarterly (Jan, Apr, Jul, Oct)
6,0Weekends (Saturday, Sunday)

Error Handling

Common error messages:

Invalid Expression

Invalid cron expression (need 5 fields)
Fix: Ensure you have exactly 5 fields separated by spaces.

Out of Range

Error: Minute value must be between 0 and 59
Fix: Check field ranges in the syntax reference.

Invalid Step

Error: Invalid step value
Fix: Step values must be numeric and within field range.

Cron vs Crontab

Standard cron (5 fields): Minute, Hour, Day, Month, DayOfWeekCrontab (6 fields): Adds a seconds field (not supported by this tool)Extended (7 fields): Adds year field (not supported by this tool)

Time Zone Handling

Cron schedules run in the server’s local time zone. Next run times are displayed in your browser’s time zone. Always verify time zone settings when deploying scheduled tasks.