T
ToolPrime

Cron Expression for Three Times a Day

Run a cron job three times daily at 8 AM, 2 PM, and 8 PM using 0 8,14,20 * * *. Provides morning, afternoon, and evening coverage.

Expression

0 8,14,20 * * *

At 08:00, 14:00, and 20:00 every day

Use Cases

Code Examples

Crontab

# At 08:00, 14:00, and 20:00 every day
0 8,14,20 * * * /path/to/your/script.sh

GitHub Actions

name: Scheduled Job
on:
  schedule:
    - cron: '0 8,14,20 * * *'
jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: echo "Running Three Times a Day"

systemd Timer

[Unit]
Description=Three Times a Day timer

[Timer]
OnCalendar=*-*-* *:*:00
Persistent=true

[Install]
WantedBy=timers.target

Tips

Frequently Asked Questions

How do I run a cron job three times a day?

List three hours separated by commas: 0 8,14,20 * * *. You can choose any three hours that suit your schedule.

Is 0 */8 * * * the same as three times a day?

Not exactly. 0 */8 * * * runs at hours 0, 8, and 16, which is three times, but at different hours than 8, 14, 20.

Related Cron Expressions