Parser de Expressão Cron
Analise e explique expressões cron em português simples — veja os próximos 10 horários de execução agendados.
Sobre esta ferramenta
Insira qualquer expressão cron (5 ou 6 campos) e obtenha uma explicação em português simples mais os próximos 10 tempos de execução agendados. Suporta sintaxe cron padrão incluindo intervalos, valores de passo, listas e aliases comuns como @daily e @hourly.
Como usar
- 1 Digite uma expressão cron (5 campos: min hora dom mês dsem).
- 2 Leia o resumo em português simples sobre quando ela é executada.
- 3 Veja os próximos 10 horários de execução agendados com base na hora atual.
- 4 Use os exemplos para aprender padrões comuns.
How a cron expression encodes a schedule
Cron is the language Unix-like systems use to say "run this job at these times." A standard expression is five space-separated fields, each covering one unit of time. This parser reads exactly five fields, explains them in plain English, and projects the next ten times the schedule will fire based on your computer's current clock.
| Position | Field | Allowed values |
|---|---|---|
| 1 | Minute | 0–59 |
| 2 | Hour | 0–23 |
| 3 | Day of month | 1–31 |
| 4 | Month | 1–12 |
| 5 | Day of week | 0–7 (0 and 7 both mean Sunday) |
Each field accepts four building blocks: * (every value), a single number, a range like 9-17, a list like 9,12,17, and a step like */15 or 9-17/2. A job fires only at a moment that satisfies all five fields at once.
A worked example: */15 9-17 * * 1-5
Read field by field: */15 in the minute slot means minutes 0, 15, 30, and 45; 9-17 in the hour slot means every hour from 9 AM through 5 PM inclusive; the two * wildcards accept any day of month and any month; and 1-5 in the weekday slot means Monday through Friday. Put together, the job runs every 15 minutes during business hours on weekdays — roughly 36 firings a day, none on weekends. The parser confirms this in words and then lists the next ten concrete timestamps so you can sanity-check it against the calendar.
Step values and the off-by-one traps
The step syntax */n means "starting at the field's minimum, every n units." So */15 on minutes gives 0/15/30/45, but */20 gives 0/20/40 and then jumps to 0 the next hour — it does not evenly fit 60, which surprises people. You can also anchor a step to a range: 0-30/10 means minutes 0, 10, 20, 30 only. For "every n hours" you put the step in the hour field: 0 */2 * * * runs at the top of every second hour.
The day-of-month vs day-of-week rule
This is the single most misunderstood part of cron, and this parser follows the traditional Unix behavior. When both the day-of-month and day-of-week fields are restricted (neither is *), the job runs when either matches — it's an OR, not an AND. So 0 0 13 * 5 fires on the 13th of the month and on every Friday, not only on Friday the 13th. If just one of the two day fields is set and the other is *, only the restricted one applies. Keep one of them as * unless you genuinely want the OR.
Aliases as shorthand
Several named schedules expand to a five-field form, which the parser resolves before evaluating:
@hourly→0 * * * *@daily/@midnight→0 0 * * *@weekly→0 0 * * 0(Sunday midnight)@monthly→0 0 1 * *@yearly/@annually→0 0 1 1 *
Common patterns worth memorizing
| Expression | Meaning |
|---|---|
0 * * * * | Every hour, on the hour |
0 9 * * 1-5 | Weekdays at 9:00 AM |
30 4 1,15 * * | 1st and 15th at 4:30 AM |
0 0 1 1 * | Once a year, Jan 1 midnight |
0 9,12,17 * * 1-5 | Weekdays at 9 AM, noon, 5 PM |
Common mistakes
- Using six fields. Some systems add a leading seconds field, but this parser expects the standard five and will tell you if the count is wrong. Drop the seconds field for portable cron.
- Expecting
*/20to land on the hour evenly. Steps reset each hour, so the spacing breaks across the boundary. - Forgetting the OR on the two day fields. Setting both day-of-month and day-of-week rarely means what people intend.
- Sundays as 0 or 7. Both work;
1-5is the safe way to write "weekdays."
How the next-run preview is computed
The tool starts at the next whole minute and walks forward one minute at a time, testing each candidate against your expression until it has collected ten matches. Because it uses your browser's local clock and time zone, the timestamps you see reflect your machine — a real server may run in UTC, so always confirm the time zone where the job will actually execute. The entire evaluation happens in your browser; nothing is sent anywhere.
Perguntas frequentes
Converta timestamps Unix para datas legíveis e vice-versa — suporta segundos, milissegundos e microssegundos.
Converta horários entre cidades — agende reuniões em fusos horários diferentes com facilidade.
Calcule sua idade exata em anos, meses, dias, horas e minutos.