Gerador de expressões Cron& Construtor visual

Construa expressões Cron visualmente com descrições em tempo real e pré-visualização das próximas 10 execuções.

Expressão Cron

Editar diretamente — os seletores sincronizam automaticamente

MinutoHoraDiaMêsDia da semana
Predefinições
Minuto
Hora
Dia
Mês
Dia da semana
Deaté
Agendamento

At 09:00 on weekdays

0 9 * * 1-5
Próximas 10 execuçõesCom base no seu horário local
1Fri, May 29, 09:00
now
2Mon, Jun 1, 09:00
in 3d 0h
3Tue, Jun 2, 09:00
in 4d 0h
4Wed, Jun 3, 09:00
in 5d 0h
5Thu, Jun 4, 09:00
in 6d 0h
6Fri, Jun 5, 09:00
in 7d 0h
7Mon, Jun 8, 09:00
in 10d 0h
8Tue, Jun 9, 09:00
in 11d 0h
9Wed, Jun 10, 09:00
in 12d 0h
10Thu, Jun 11, 09:00
in 13d 0h

Esta ferramenta resolveu o seu problema?

O que é um construtor de expressões cron

Um construtor de expressões cron é uma ferramenta visual que ajuda desenvolvedores a construir expressões de agendamento cron complexas por meio de cliques e seleções simples, sem memorizar sintaxe críptica.

Casos de uso comuns de trabalhos cron

Backups agendados: executar scripts de backup de banco de dados às 2h da manhã diariamente. Agendamento de tarefas: verificar a fila de emails a cada 5 minutos. Geração de relatórios: gerar relatórios de vendas semanais toda segunda-feira às 9h.

Exemplos de código

JavaScript (node-cron)
import cron from "node-cron";

// Run every weekday at 9:00 AM
cron.schedule("0 9 * * 1-5", () => {
  console.log("Good morning!");
  sendDailyReport();
});

// Run every 30 minutes
cron.schedule("*/30 * * * *", () => {
  checkForUpdates();
});
Python (APScheduler)
from apscheduler.schedulers.blocking \
    import BlockingScheduler
from apscheduler.triggers.cron \
    import CronTrigger

scheduler = BlockingScheduler()

# Every day at midnight
@scheduler.scheduled_job(
    CronTrigger.from_crontab("0 0 * * *")
)
def nightly_cleanup():
    clean_temp_files()

scheduler.start()
GitHub Actions
# .github/workflows/scheduled.yml
name: Scheduled Task
on:
  schedule:
    # UTC time — runs daily at 01:00 UTC
    - cron: "0 1 * * *"
  workflow_dispatch: # manual trigger

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm run build
Linux Crontab
# Edit crontab: crontab -e
# View crontab: crontab -l

# Backup database daily at 3:30 AM
30 3 * * * /usr/local/bin/backup.sh

# Rotate logs every Monday at midnight
0 0 * * 1 /usr/sbin/logrotate /etc/logrotate.conf

# Check disk space every 15 minutes
*/15 * * * * df -h > /tmp/disk.log

Perguntas frequentes

What are the 5 fields in a Cron expression?
A standard Cron expression has 5 space-separated fields, from left to right: Minute (0-59), Hour (0-23), Day of Month (1-31), Month (1-12), and Day of Week (0-7, where both 0 and 7 represent Sunday). For example, "0 9 * * 1-5" means every weekday at 9:00 AM.
What's the difference between * and */5?
The asterisk * matches every possible value in that field — e.g., * in the minute field means every minute. The */5 syntax is a step value: starting from the minimum, execute every 5 units. So */5 in the minute field fires at 0, 5, 10, 15...55. You can also set a custom start: 2-30/5 means every 5 minutes from minute 2 through 30.
Can I specify both day-of-month and day-of-week?
Yes, but note the special Unix cron behavior: when both day-of-month and day-of-week are set (not *), they form an OR condition, not AND. For example, "0 9 15 * 1" runs at 9:00 on the 15th of every month OR every Monday — not only when the 15th falls on a Monday.
How do I schedule a task for 2:30 AM daily?
Use the expression "30 2 * * *". The first field (30) is the minute, the second field (2) is the hour (2 AM), and the three asterisks mean every day, every month, any weekday. Cron uses 24-hour time, so 2:30 PM would be "30 14 * * *".
What special characters can I use in Cron expressions?
Common special characters include: * (match all values), comma (list values like 1,3,5), hyphen (define range like 1-5), and slash (step values like */10). Some systems also support L (last day), W (weekday), and # (nth weekday), but standard 5-field cron uses only the first four.
Which systems are compatible with the generated expressions?
This tool generates standard 5-field Cron expressions compatible with virtually all major platforms: Linux/macOS crontab, Docker, Kubernetes CronJob, GitHub Actions (schedule trigger), CI/CD systems (Jenkins, GitLab CI), cloud providers (AWS CloudWatch, Google Cloud Scheduler, Azure Functions), and most task scheduling frameworks.