Cron for every 4 hours
0 */4 * * *On the hour, every 4 hours, every day
What this schedule does
0 */4 * * * runs at minute 0 every 4 hours. It is the usual pattern for rolling logs, billing snapshots, and “once an hour is enough” ETL. Because it is anchored at :00, two regions with different offsets still share the same UTC minute. Pair it with a timezone-aware preview before you ship to GitHub Actions (UTC) or a Linux host (often local).
Next 5 runs (UTC)
Times below are computed for UTC. Open the builder to preview another timezone.
- Thu, 20 Aug 2026, 20:00 UTC
- Fri, 21 Aug 2026, 00:00 UTC
- Fri, 21 Aug 2026, 04:00 UTC
- Fri, 21 Aug 2026, 08:00 UTC
- Fri, 21 Aug 2026, 12:00 UTC
Copy-paste snippets
GitHub Actions
UTC only. Quote the expression so YAML keeps the stars.
on:
schedule:
- cron: '0 */4 * * *'Kubernetes
CronJob spec.schedule. Kubernetes uses the timezone of the kube-controller-manager unless you set .spec.timeZone.
apiVersion: batch/v1
kind: CronJob
metadata:
name: job
spec:
schedule: "0 */4 * * *"
jobTemplate:
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: job
image: busybox
args: ["echo", "run"]AWS EventBridge
Six fields: minutes hours day-of-month month day-of-week year. Use ? in either day-of-month or day-of-week.
cron(0 */4 * * ? *)Quartz
Quartz is seconds-first (6 or 7 fields). Day-of-week names are MON, TUE, … and ? is required in one of the day fields.
0 0 */4 * * *Vercel Cron
{
"crons": [
{
"path": "/api/cron",
"schedule": "0 */4 * * *"
}
]
}crontab
0 */4 * * * /usr/local/bin/jobnode-cron
import cron from 'node-cron';
cron.schedule('0 */4 * * *', () => {
// job
});Spring @Scheduled
Spring uses 6 fields by default (seconds first) unless you set spring.task.scheduling.cron.expression.
@Scheduled(cron = "0 0 */4 * * *")
public void run() {
// job
}