Cron Expression for Every 10 Minutes During Night Hours
Run a cron job every 10 minutes from midnight to 6 AM using */10 0-6 * * *. Ideal for overnight monitoring and batch processing.
Expression
*/10 0-6 * * * Every 10 minutes from 00:00 to 06:59
Use Cases
- • Monitoring overnight batch jobs for failures
- • Processing data queues during low-traffic hours
- • Running frequent health checks on overnight deployments
- • Handling overnight customer support ticket routing
Code Examples
Crontab
# Every 10 minutes from 00:00 to 06:59
*/10 0-6 * * * /path/to/your/script.sh GitHub Actions
name: Scheduled Job
on:
schedule:
- cron: '*/10 0-6 * * *'
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo "Running Every 10 Minutes During Night Hours" systemd Timer
[Unit]
Description=Every 10 Minutes During Night Hours timer
[Timer]
OnCalendar=*-*-* *:*:00
Persistent=true
[Install]
WantedBy=timers.target Tips
- ✓ Runs 42 times per night (6 per hour times 7 hours)
- ✓ 0-6 covers midnight through 6:59 AM
- ✓ Pair with a daytime schedule for full 24-hour coverage at different frequencies
- ✓ Good for tasks that benefit from off-peak resources
Frequently Asked Questions
What does 0-6 mean in the hour field?
0-6 is a range covering hours 0 (midnight) through 6 (6 AM). The job runs during the 00:xx, 01:xx, 02:xx, 03:xx, 04:xx, 05:xx, and 06:xx hours.
How do I run every 10 minutes all day except night?
Use */10 7-23 * * * to run every 10 minutes from 7 AM to 11:59 PM, skipping the 0-6 night hours.