devShakib

Loading devShakib…

Cron Parser

Explain a cron expression in plain English and preview its next run times.

The five fields are minute, hour, day of month, month, and day of week, and each accepts a list, a range, or a step. Most confusion is not about the syntax but about `*/15`, which does not mean "every fifteen minutes from now" — it means every minute divisible by fifteen, so a job added at 09:07 first runs at 09:15.

The genuine trap is that day-of-month and day-of-week are combined with OR, not AND. `0 0 1 * 1` does not mean the first of the month when it falls on a Monday; it fires on the first of every month AND on every Monday. Restricting to both requires a check inside the job.

Reading the next few run times is the fastest way to catch a mistake, because a wrong expression is almost always valid — it schedules something, just not the thing you meant, and nothing tells you until the run that did not happen.