Cron expressions power scheduled tasks across Linux, CI/CD pipelines, and cloud functions. But the five-field syntax (* * * * *) is cryptic. Does 0 */2 * * 1-5 run every 2 hours on weekdays or every 2 minutes? A crontab generator removes the guesswork with visual controls and plain-English descriptions.
What Is Crontab Generator?
A crontab generator lets you build cron expressions through dropdowns and toggles instead of memorizing the five-field format (minute, hour, day-of-month, month, day-of-week). You set your schedule visually, and the tool generates the cron expression with a human-readable description and the next 5 execution times.
How to Use Crontab Generator on DevToolHub
- Open the Crontab Generator tool on DevToolHub — no signup required.
- Choose the schedule type: every X minutes, hourly, daily, weekly, monthly, or custom.
- Set specific values using dropdowns for each field.
- Read the plain-English description to verify your schedule.
- Check the 'Next 5 runs' preview to confirm timing.
- Copy the cron expression for your crontab, CI config, or cloud scheduler.
Common Cron Schedules
Frequently needed schedules with their expressions:
# Every day at 3:00 AM
0 3 * * *
# Every Monday at 9:00 AM
0 9 * * 1
# Every 15 minutes during business hours (9-17) on weekdays
*/15 9-17 * * 1-5
# First day of every month at midnight
0 0 1 * *
# Every 6 hours
0 */6 * * *
# Twice daily: 8 AM and 8 PM
0 8,20 * * *The generator shows these schedules in plain English: 'At minute 0 past every 6th hour' — confirming what the numbers mean.
Database Backup Schedule
Automated backups with different frequencies:
# Full backup: Sunday at 2 AM
0 2 * * 0 pg_dump mydb > /backups/full_$(date +%Y%m%d).sql
# Incremental: Every 4 hours on weekdays
0 */4 * * 1-5 pg_dump --data-only mydb >> /backups/incr.sql
# Cleanup old backups: 1st and 15th at midnight
0 0 1,15 * * find /backups -mtime +30 -deleteThe next-runs preview confirms the Sunday backup won't conflict with the weekday incrementals.
CI/CD Scheduled Pipelines
GitHub Actions and GitLab CI cron schedules:
# GitHub Actions: Run tests nightly
on:
schedule:
- cron: '0 4 * * *' # 4 AM UTC daily
# GitLab CI: Deploy to staging every Friday at 5 PM
staging_deploy:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
# Schedule: 0 17 * * 5
# AWS EventBridge: Cache warm-up every 30 minutes
rate(30 minutes)
# Or cron: */30 * * * ? * (AWS uses 6 fields)Note: AWS cron uses 6 fields (with seconds or year) — the generator handles provider-specific formats.
Pro Tips
- Verify with 'Next 5 runs' — the expression you think is right may fire at unexpected times; always check.
- Use UTC for servers — cron jobs on servers should use UTC to avoid daylight-saving-time surprises.
- Stagger jobs — don't schedule everything at
0 0 * * *(midnight); spread across minutes to avoid resource spikes. - Log everything — redirect output to a log file:
0 3 * * * /script.sh >> /var/log/cron.log 2>&1.
When You Need This
- Scheduling database backups and cleanup tasks
- Configuring CI/CD pipeline schedules (GitHub Actions, GitLab CI)
- Setting up cloud function triggers (AWS Lambda, Google Cloud Functions)
- Planning cron jobs for log rotation, cache warming, and report generation
Free Tools Mentioned in This Article