Run a cron 4 times a day with 0 0,6,12,18 * * *. Every 6 hours at midnight, 6AM, noon, 6PM.
The cron expression 0 0,6,12,18 * * * uses a comma-separated list in the hour field (0,6,12,18) to run 4 times per day at 00:00, 06:00, 12:00, 18:00 (midnight, 6 AM, noon, 6 PM). Comma-separated values mean "this hour OR that hour," allowing multiple triggers per day without creating separate cron entries. Running 4 times daily is common for tasks like sending digest emails, performing data synchronization checkpoints, generating status reports, running incremental backups, and checking external service availability at regular intervals throughout the day. For Quartz Scheduler, use 0 0,6,12,18 * ? * * (7 fields with seconds, ? for day-of-week). For AWS EventBridge, use cron(0 0,6,12,18 ? * * *). For Kubernetes CronJob, use schedule: "0 0,6,12,18 * * *" directly. Alternative: if the hours are evenly spaced, you can use a step operator instead. For example, 0 0,6,12,18 * * * is equivalent to 0 */6 * * *. The step form is more concise, but explicit comma values are clearer when the spacing is irregular. To add weekday-only restriction, append 1-5 to the day-of-week field: 0 0,6,12,18 * * 1-5.
The expression 0 0,6,12,18 * * * means: at minute 0, hour 0,6,12,18, day-of-month *, month *, day-of-week *. Each field in the cron expression controls a different time component: minute, hour, day of month, month, and day of week.
Run crontab -e in your terminal to open your crontab editor. Add a new line: 0 0,6,12,18 * * * /path/to/your/script.sh. Save and exit. Verify with crontab -l. Make sure your script is executable (chmod +x script.sh) and uses full paths for all commands.
Quartz Scheduler: 0 0,6,12,18 * * ?. AWS EventBridge: cron(0 0,6,12,18 ? * * *). Kubernetes CronJob: schedule: "0 0,6,12,18 * * *" (standard 5-field format). Each platform has slight syntax differences — use our dialect switcher above to get the exact expression.
If the hours are evenly spaced, yes. For example, 0 0,6,12,18 * * * is the same as 0 */6 * * *. The step form is more concise. But for irregular spacing (like 0 8,12,17 * * *), you must use comma-separated values.
Common pitfalls: (1) Cron uses a minimal PATH — always use full paths to commands and scripts. (2) Percent signs (%) must be escaped with backslash in crontab. (3) Cron runs in the system timezone — set CRON_TZ=UTC at the top of your crontab for consistent UTC scheduling. (4) Redirect output to prevent email spam: 0 0,6,12,18 * * * /path/command >> /var/log/myjob.log 2>&1. (5) Test your cron expression with crontab.guru or our validator above before deploying.
The cron expression 0 0,6,12,18 * * * has different syntax on various scheduling platforms. Here is the equivalent expression for each:
| Platform | Expression |
|---|---|
| Unix / Linux crontab | 0 0,6,12,18 * * * |
| Quartz Scheduler (Java) | 0 0,6,12,18 * * ? |
| AWS EventBridge | cron(0 0,6,12,18 ? * * *) |
| Kubernetes CronJob | 0 0,6,12,18 * * * |
| Vercel Cron | 0 0,6,12,18 * * * |
| GitHub Actions | 0 0,6,12,18 * * * (UTC) |
Key differences across platforms: Quartz uses 7 fields starting with seconds and supports L (last) and W (weekday) modifiers. AWS EventBridge requires a 6th year field and uses ? instead of * in day fields when the other day field is specified. Kubernetes uses standard 5-field Unix cron. Vercel Cron uses the same format but schedules are defined in vercel.json. GitHub Actions uses standard cron but runs in UTC timezone only, so adjust the hour field for your local timezone offset.
Follow these tips when setting up cron jobs in production: