0 */6 * * *
At 00:00, 06:00, 12:00 and 18:00
Field by Field
| Field | Value | Matches |
|---|---|---|
| Minute | 0 | 0 |
| Hour | */6 | 0, 6, 12, 18 |
| Day of month | * | every day |
| Month | * | every month |
| Day of week | * | every day |
Four Times a Day
Runs land at 00:00, 06:00, 12:00 and 18:00. It is the coarsest schedule that still gives you a run inside every working shift, which is why it is common for backups and data syncs.
Time Zones Are the Whole Problem Here
A six-hourly job at UTC hits 00:00, 06:00, 12:00, 18:00 UTC — which in UTC-08:00 is 16:00, 22:00, 04:00 and 10:00 local. If the job is meant to run "overnight" in a particular region, that is not what you have configured.
Write the local times you want first, convert each to UTC, then build the expression from
the converted list rather than reaching for */6.
Pairing With a Retry
At six-hour spacing, a failed run means six hours of missing data. Add a retry a few minutes later rather than waiting for the next scheduled slot — most transient failures clear in seconds.
Time Zones
Standard crontab evaluates in system local time. Vercel Cron, GitHub Actions, Kubernetes
CronJobs and AWS EventBridge all evaluate in UTC. If converting your local time crosses
midnight, the day-of-week field shifts too — weekdays at 5pm in UTC-07:00 is
0 0 * * 2-6, not 0 0 * * 1-5.
The Day-Field Trap
When both the day-of-month and day-of-week fields are restricted, cron matches either,
not both. 0 0 13 * 5 runs on every 13th *and* every Friday — not Friday the 13th. Leave
one of them as * unless you genuinely want the union.
Other Common Schedules
| Expression | Runs |
|---|---|
* * * * * | Every minute |
*/5 * * * * | Every 5 minutes |
*/15 * * * * | Every 15 minutes |
0 * * * * | Every hour, on the hour |
0 0 * * * | Every day at midnight |
0 9 * * * | Every day at 9am |
0 9 * * 1-5 | Weekdays at 9am |
0 9 * * 1 | Every Monday at 9am |
Making the Job Safe
- Assume double firing. DST transitions, restarts and retries all cause it. Make the job
- Assume overlap. Cron starts the next run whether or not the last one finished. Take a
- Avoid
:00. Every hourly job on the internet fires at the top of the hour; a random
- Log the start and end. A cron job that silently stops running is invisible until
Deploying This Schedule
``bash
# crontab -e (system local time)
0 */6 * * * /usr/local/bin/job.sh >> /var/log/job.log 2>&1
`
`json
// vercel.json (UTC)
{ "crons": [{ "path": "/api/job", "schedule": "0 */6 * * *" }] }
`
`yaml
# .github/workflows/job.yml (UTC)
on:
schedule:
- cron: '0 */6 * * *'
`
Starting from midnight UTC on 1 January 2026, this fires at:
| Next runs |
|---|
| 2026-01-01 06:00 UTC |
| 2026-01-01 12:00 UTC |
| 2026-01-01 18:00 UTC |
| 2026-01-02 00:00 UTC |
At 00:00, 06:00, 12:00 and 18:00.Making It Survive Production
Redirect output. A cron job with no redirect emails its output to the crontab owner,
and on most servers that mail goes nowhere. Log to a file instead.
Use absolute paths. Cron runs with a minimal environment — noPATHyou recognise,
no shell profile, no nvm. A script that works in your terminal frequently fails here
for exactly that reason.
Escape percent signs. In a crontab,%means newline.date +\%Yneeds the
backslash or the command truncates at the percent.
Take a lock. Cron starts the next run whether or not the last finished.flock` is
- Alert on absence. A job that stops running is silent. Ping a dead-man's-switch service