Build, validate, and understand cron expressions with a visual interface. Essential for scheduling jobs, backups, and automated tasks on Linux/Unix systems.

Build Cron Expression

<div class="field">
  <label for="hour">Hour (0-23):</label>
  <input type="text" id="hour" value="*" placeholder="* or 0-23">
</div>

<div class="field">
  <label for="day">Day of Month (1-31):</label>
  <input type="text" id="day" value="*" placeholder="* or 1-31">
</div>

<div class="field">
  <label for="month">Month (1-12):</label>
  <input type="text" id="month" value="*" placeholder="* or 1-12">
</div>

<div class="field">
  <label for="weekday">Day of Week (0-7, 0=Sun):</label>
  <input type="text" id="weekday" value="*" placeholder="* or 0-7">
</div>

Common Use Cases

  • Backup Jobs: Schedule nightly backups at specific times
  • Log Rotation: Automatically rotate logs on a schedule
  • Report Generation: Generate reports at end of day/week/month
  • Monitoring Scripts: Run health checks at regular intervals
  • Cleanup Tasks: Delete old files on a schedule
  • Data Synchronization: Sync data between systems periodically

Cron Expression Format

Lang:
* * * * *
│ │ │ │ │
│ │ │ │ └─── Day of Week (0-7, 0 or 7 = Sunday)
│ │ │ └───── Month (1-12)
│ │ └─────── Day of Month (1-31)
│ └───────── Hour (0-23)
└─────────── Minute (0-59)

Special Characters

  • * - Any value (every minute, hour, day, etc.)
  • , - List of values (1,15,30 = 1st, 15th, and 30th)
  • - - Range of values (1-5 = 1, 2, 3, 4, 5)
  • / - Step values (*/15 = every 15 units)
  • ? - No specific value (day or weekday only, some cron implementations)

Common Examples

Every minute:

Lang:
* * * * *

Every hour at minute 0:

Lang:
0 * * * *

Every day at 2:30 AM:

Lang:
30 2 * * *

Every Monday at 9:00 AM:

Lang:
0 9 * * 1

Every 15 minutes:

Lang:
*/15 * * * *

First day of every month at midnight:

Lang:
0 0 1 * *

Weekdays at 6:00 AM:

Lang:
0 6 * * 1-5

Every 6 hours:

Lang:
0 */6 * * *

Testing Cron Expressions

View crontab:

Lang: bash
1crontab -l

Edit crontab:

Lang: bash
1crontab -e

Test cron job manually:

Lang: bash
1# Run the command directly to test
2/path/to/script.sh
3
4# Check cron logs
5grep CRON /var/log/syslog
6# or
7tail -f /var/log/cron

Important Notes

  • Cron uses server local time by default
  • Ensure scripts have execute permissions (chmod +x script.sh)
  • Use absolute paths in cron jobs
  • Redirect output to log files for debugging: command >> /var/log/job.log 2>&1
  • Some cron implementations support additional features (like @reboot, @daily, etc.)
  • Minutes field runs 0-59, hours run 0-23 (24-hour format)