Crontab Generator
Build crontab lines visually — pick a preset or dial in each field (minute, hour, day of month, month, day of week), add your command, and get a ready-to-paste crontab line with a plain-English description and the next 5 run times.
1. Pick a preset
2. Or build it field by field
3. Your crontab line
crontab -e)
How to install your crontab line
User crontab (runs as you)
- Open your crontab:
crontab -e - Paste the generated line, save, and exit. Make sure the file ends with a newline.
- Verify with
crontab -l.
System crontab (runs as a specific user)
- Fill in the User field above to preview the 6-field format.
- Create a file like
/etc/cron.d/my-jobcontaining the system line. - No restart needed — cron picks up
/etc/cron.d/automatically.
Before you trust it
- Use absolute paths for every binary — cron's PATH is minimal (
/usr/bin:/bin). - Capture output while testing: append
>> /var/log/myjob.log 2>&1to the command. - Test with a frequent schedule first (e.g. every minute), then switch to the real one.
Worked examples
Next runs computed from Fri, 9 Oct 2026 00:00 UTC.
| Schedule | Expression | Example command | Next 3 runs (UTC) |
|---|---|---|---|
| Database backup every night at 2:30 AM At 02:30 every day. |
30 2 * * * | /usr/local/bin/db-backup.sh | Fri, 9 Oct 2026, 02:30 UTC Sat, 10 Oct 2026, 02:30 UTC Sun, 11 Oct 2026, 02:30 UTC |
| Weekday standup reminder at 9:00 AM At 09:00, Monday to Friday. |
0 9 * * 1-5 | notify-send "Standup in 5 minutes" | Fri, 9 Oct 2026, 09:00 UTC Mon, 12 Oct 2026, 09:00 UTC Tue, 13 Oct 2026, 09:00 UTC |
| Health check every 15 minutes Every 15 minutes. |
*/15 * * * * | /usr/local/bin/healthcheck.sh >> /var/log/healthcheck.log 2>&1 | Fri, 9 Oct 2026, 00:15 UTC Fri, 9 Oct 2026, 00:30 UTC Fri, 9 Oct 2026, 00:45 UTC |
| Monthly sales report, 1st at 8:00 AM At 08:00 on day 1 of the month. |
0 8 1 * * | /usr/local/bin/sales-report.sh | Sun, 1 Nov 2026, 08:00 UTC Tue, 1 Dec 2026, 08:00 UTC Fri, 1 Jan 2027, 08:00 UTC |
| Log rotation every Sunday at 3:00 AM At 03:00, Sunday. |
0 3 * * 0 | /usr/sbin/logrotate /etc/logrotate.conf | Sun, 11 Oct 2026, 03:00 UTC Sun, 18 Oct 2026, 03:00 UTC Sun, 25 Oct 2026, 03:00 UTC |
| Clear cache every 6 hours At minute 0 of every 6 hours. |
0 */6 * * * | /usr/local/bin/clear-cache.sh | Fri, 9 Oct 2026, 06:00 UTC Fri, 9 Oct 2026, 12:00 UTC Fri, 9 Oct 2026, 18:00 UTC |
| Twice daily: 9:00 AM and 6:00 PM At 09:00 and 18:00 every day. |
0 9,18 * * * | /usr/local/bin/sync-reminder.sh | Fri, 9 Oct 2026, 09:00 UTC Fri, 9 Oct 2026, 18:00 UTC Sat, 10 Oct 2026, 09:00 UTC |
| Yearly on January 1st at noon At 12:00 on day 1 of the month, in January. |
0 12 1 1 * | /usr/local/bin/new-year-tasks.sh | Fri, 1 Jan 2027, 12:00 UTC Sat, 1 Jan 2028, 12:00 UTC Mon, 1 Jan 2029, 12:00 UTC |
| Every 10 minutes during business hours, weekdays Every 10 minutes between 09:00 and 17:59 on Monday to Friday. |
*/10 9-17 * * 1-5 | /usr/local/bin/metrics-collector.sh | Fri, 9 Oct 2026, 09:00 UTC Fri, 9 Oct 2026, 09:10 UTC Fri, 9 Oct 2026, 09:20 UTC |
Crontab field reference
| Field | Allowed values | Special characters |
|---|---|---|
| Minute | 0–59 | * , - / |
| Hour | 0–23 | * , - / |
| Day of month | 1–31 | * , - / |
| Month | 1–12 (or JAN–DEC) | * , - / |
| Day of week | 0–7 (or SUN–SAT; 0 and 7 = Sunday) | * , - / |
* any value , list - range / step (e.g. */15 = every 15). When both day-of-month and day-of-week are restricted, cron runs the job when either matches.
Frequently asked questions
Free tool by NRTechStudio