Run Tasks Every 15 Minutes During Day | CronBase

cron expression Standard
$ */15 8-20 * * *

Every fifteen minutes starting in the morning and continuing through mid-evening every day.

This cron expression executes a task every fifteen minutes during the thirteen hour block starting at eight AM and ending at eight forty five PM daily. It is designed to run jobs frequently during peak operational daytime and evening hours, while automatically pausing execution overnight to conserve system resources.

Minute
*/15
Hour
8-20
Day of Month
*
Month
*
Day of Week
*
How it works

Next 5 Runs

  • in 3m 47s
  • in 18m 47s
  • in 11h 33m
  • in 11h 48m
  • in 12h 3m

* Tools

Code & Implementations

Bash
#!/usr/bin/env bash\nset -euo pipefail\n\n# Production Bash execution wrapper for standard crontab\n# Crontab entry: */15 8-20 * * * /usr/local/bin/sync_job.sh >> /var/log/cron_sync.log 2>&1\n\nLOCKFILE=\"/var/run/sync_job.lock\"\n\n# Acquire an exclusive lock to prevent overlapping executions\nexec 9>\"$LOCKFILE\"\nif ! flock -n 9; then\n  echo \"[$(date -u)] Error: Another instance of this job is already running. Exiting.\" >&2\n  exit 1\nfi\n\necho \"[$(date -u)] Starting daytime sync job...\"\n\n# Introduce randomized jitter (0-15 seconds) to avoid stampeding downstream APIs\nJITTER=$(( RANDOM % 16 ))\nsleep \"$JITTER\"\n\n# Execute actual business logic\nif /usr/local/bin/perform_sync_payload; then\n  echo \"[$(date -u)] Job completed successfully.\"\nelse\n  echo \"[$(date -u)] Job failed with exit code $?.\" >&2\n  exit 2\nfi
Setup notes

Place this script in /usr/local/bin/sync_job.sh, make it executable with chmod +x, and add */15 8-20 * * * /usr/local/bin/sync_job.sh to your system crontab.

Last verified:

Partner BetterStack

Monitor this schedule in production

Get alerted the moment this cron job fails, is late, or doesn't run. BetterStack tracks execution, duration, and output — no infrastructure required.

Platform Equivalents

AWS EventBridge

Standard cron expressions often need conversion for AWS EventBridge schedules.

EventBridge Rule
cron(*/15 8-20 * * ? *)

Systemd Timer

OnCalendar*-*-* 08..20:00/15:00

my-task.timer
[Unit]
Description=Timer for cron expression: */15 8-20 * * *

[Timer]
OnCalendar=*-*-* 08..20:00/15:00
Persistent=true

[Install]
WantedBy=timers.target

Last verified:

Frequently Asked Questions

Does this expression execute at nine PM?

No. The hour range is eight to twenty inclusive. The last execution of the block occurs at eight forty-five PM (20:45), and the scheduler remains idle until eight AM (08:00) the following morning.

How do daylight saving time transitions affect this daytime schedule?

If your system clock operates on local time, the spring transition will skip one hour of executions, while the autumn transition will repeat an hour of executions. To avoid duplicate or missed runs, configure your cron daemon or scheduler to run on UTC.

What happens if a job takes longer than fifteen minutes to complete?

If an execution exceeds fifteen minutes, a new instance will spawn while the previous one is still running, potentially causing database locks or resource exhaustion. Implement file locking, mutexes, or set concurrency policies to prevent overlapping executions.

Can I restrict this fifteen-minute schedule to weekdays only?

Yes, you can append a weekday restriction by changing the final field. Modifying the expression to `*/15 8-20 * * 1-5` will restrict executions to Monday through Friday, keeping weekends completely free of executions.

How does this schedule help optimize cloud infrastructure costs?

By turning off executions between nine PM and eight AM, you eliminate eleven hours of compute time daily. This is highly effective for serverless functions, database scaling, and API gateways that charge per invocation.

* Explore

Related expressions you might need

Last verified:

Was this helpful?