Cron / every 45 minutes
Cron every 45 minutes: why */45 doesn’t work, and what does
Cron steps restart every hour, so */45 runs at :00 and :45 — gaps of 45, then 15 minutes. A true 45-minute interval can’t be written as one cron expression.
The closest expression
0,45 * * * *
In words: At minute 0 and 45.
Field by field
| Field | Value | Means |
|---|---|---|
| Minute (0–59) | 0,45 | minute 0 and 45 |
| Hour (0–23) | * | every hour |
| Day of month (1–31) | * | every day |
| Month (1–12) | * | every month |
| Day of week (0–6, Sunday = 0) | * | every day of the week |
Next runs
Starting from 2026-11-27 00:00 UTC:
- Fri, Nov 27, 2026, 00:45 UTC
- Fri, Nov 27, 2026, 01:00 UTC
- Fri, Nov 27, 2026, 01:45 UTC
- Fri, Nov 27, 2026, 02:00 UTC
- Fri, Nov 27, 2026, 02:45 UTC
Try other expressions and timezones in the cron expression tool.
What */45 really does
*/45 * * * * matches minutes 0 and 45. The job runs at 09:00, 09:45, 10:00, 10:45 … — two runs 15 minutes apart every hour. That is usually not what people want.
How to get a real 45-minute interval
- Run every 15 minutes (
*/15 * * * *) and let the job skip unless 45 minutes have passed since its last real run (store the time in a key-value store). - Use a scheduler with fixed-rate schedules: AWS EventBridge
rate(45 minutes), systemdOnUnitActiveSec=45min. - Or write the cycle out: 45-minute runs line up again every 3 hours, so four lines cover it:
0 */3 * * * /path/to/job.sh
45 */3 * * * /path/to/job.sh
30 1-23/3 * * * /path/to/job.sh
15 2-23/3 * * * /path/to/job.sh
That gives 00:00, 00:45, 01:30, 02:15, 03:00 … — exactly 45 minutes apart, 32 runs a day.
The same schedule on other platforms
Linux crontab. Edit with crontab -e. Runs in the server’s timezone unless you set CRON_TZ (cronie) or TZ.
0,45 * * * * /path/to/job.sh >> /var/log/job.log 2>&1
GitHub Actions. Schedules run in UTC on the default branch, and runs can start late when GitHub is busy.
on:
schedule:
- cron: '0,45 * * * *'
Kubernetes CronJob. Set timeZone (Kubernetes 1.27+) or the schedule follows the controller’s timezone, usually UTC. concurrencyPolicy: Forbid stops runs from overlapping.
apiVersion: batch/v1
kind: CronJob
metadata:
name: my-job
spec:
schedule: "0,45 * * * *"
timeZone: "Etc/UTC"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: job
image: busybox
command: ["sh", "-c", "echo running"]
AWS EventBridge Scheduler. Six fields (the last is the year); one of day-of-month or day-of-week must be ?. Pick the timezone on the schedule.
cron(0,45 * * * ? *)
Wisp. Describe the job and say how often in plain words — Wisp writes the function, turns the schedule into this cron expression in your timezone, and runs it with logs and error alerts.
"Every 45 minutes, fetch new orders from Shopify and post a summary to Slack."
Questions
*Why doesn’t `/45` work?** A step counts within its field: minutes 0–59 stepping by 45 gives 0 and 45, then starts again the next hour.
Try any expression in the cron tool · Run it on a schedule with Wisp