Cron Every 3 Hours
Cron expression 0 */3 * * * means At minute 0, every 3 hours.
Cron expression to run a job every 3 hours: 0 */3 * * *. Fires 8 times per day at midnight, 3 AM, 6 AM, 9 AM, noon, 3 PM, 6 PM, and 9 PM.
Cron Expression
Common use cases
- Aggregating hourly metrics into 3-hour summaries
- Refreshing long-lived authentication tokens
- Sending periodic digest emails throughout the day
- Syncing data between systems on a relaxed schedule
Want to customize this schedule?
Open it in the visual builder to tweak the expression interactively.
Open in BuilderNeed to monitor this cron job?
Cronhub tracks your scheduled jobs and alerts you if they fail or run late.
Platform usage examples
# Edit your crontab
crontab -e
# Add this line to run every 3 hours
0 */3 * * * /usr/bin/php /var/www/html/script.php
# Or run a shell script
0 */3 * * * /home/user/scripts/job.sh >> /var/log/job.log 2>&1# .github/workflows/scheduled.yml
name: Scheduled Job
on:
schedule:
- cron: '0 */3 * * *'
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run job
run: echo "Running every 3 hours"apiVersion: batch/v1
kind: CronJob
metadata:
name: my-scheduled-job
spec:
schedule: "0 */3 * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: job
image: my-image:latest
restartPolicy: OnFailureRelated developer tools
More free tools for engineering workflows that pair with scheduled jobs:
Frequently asked questions
What is the cron expression for every 3 hours?
The cron expression is 0 */3 * * *. Cron expression to run a job every 3 hours: 0 */3 * * *. Fires 8 times per day at midnight, 3 AM, 6 AM, 9 AM, noon, 3 PM, 6 PM, and 9 PM.
How do I schedule a cron job to run every 3 hours in Linux?
Open your crontab with "crontab -e" and add a new line: 0 */3 * * * /path/to/your/script.sh — this schedules your script to run every 3 hours. Save and exit; the cron daemon picks up the change immediately.
What does the cron expression "0 */3 * * *" mean?
Cron expression to run a job every 3 hours: 0 */3 * * *. Fires 8 times per day at midnight, 3 AM, 6 AM, 9 AM, noon, 3 PM, 6 PM, and 9 PM.
Can I use "0 */3 * * *" in GitHub Actions?
Yes. In your workflow YAML, set the schedule trigger: on: schedule: - cron: '0 */3 * * *'. GitHub Actions uses standard 5-field Unix cron syntax, so this expression works as-is.