← Guides

Developer Guide

Invalid Cron Expression Errors

Fix invalid cron expression errors. Learn correct cron syntax: 5 fields, valid ranges, special characters, and common mistakes to avoid.

invalid cron expressioncron syntax errorcron formatcrontab errorfix cron expression

Cron expression errors typically come from invalid ranges, wrong field counts, or misused special characters. This guide covers the most common mistakes.

Wrong number of fields

Standard cron has 5 fields: minute (0-59), hour (0-23), day of month (1-31), month (1-12), day of week (0-6). Some systems add a 6th field for seconds. Count your fields — too many or too few is a common error.

Invalid ranges

Each field has a valid range. 60 is invalid for minutes (max 59). 0 is invalid for day of month (min 1). February does not have 31 days — cron will skip runs that land on non-existent dates.

Step values

*/15 means every 15 units. 0-30/10 means 0, 10, 20, 30. The step must divide evenly or you get unexpected schedules. */7 in the minute field runs at 0, 7, 14... not every 7 minutes starting from now.

Day of week confusion

Day of week is 0-6 (Sunday=0) or 1-7 (Sunday=7) depending on the system. Linux cron uses 0-6. Some systems accept both 0 and 7 for Sunday. Check your scheduler documentation.

Use the generator

The Cron Expression Generator shows a human-readable description of your schedule. If the description does not match your intent, your expression is wrong.

Summary

Build and validate cron expressions in the Cron Expression Generator to see exactly when your schedule will run.

Try it yourself

Put what you've learned into practice with our free browser-native tool.

Open Tool →