Cron Expression for Daily at 6 PM
Run a cron job once per day at 6:00 PM using 0 18 * * *. Ideal for end-of-day summaries, reports, and cleanup tasks.
Expression
0 18 * * * At 18:00 every day
Use Cases
- • Sending end-of-day summary reports
- • Running post-business-hours database maintenance
- • Triggering daily backup after work hours
- • Generating evening analytics dashboards
Code Examples
Crontab
# At 18:00 every day
0 18 * * * /path/to/your/script.sh GitHub Actions
name: Scheduled Job
on:
schedule:
- cron: '0 18 * * *'
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo "Running Daily at 6 PM" systemd Timer
[Unit]
Description=Daily at 6 PM timer
[Timer]
OnCalendar=*-*-* *:*:00
Persistent=true
[Install]
WantedBy=timers.target Tips
- ✓ Cron uses 24-hour time, so 6 PM is hour 18
- ✓ Good for tasks that should run after business hours end
- ✓ Less likely to affect user experience during off-peak hours
- ✓ Consider time zones for distributed teams
Frequently Asked Questions
How do I express 6 PM in cron?
Use 18 in the hour field. Cron uses 24-hour format, so 6 PM is 18. The full expression is 0 18 * * *.
Can I run at 6:30 PM instead?
Yes, use 30 18 * * * to run at 18:30 (6:30 PM) every day.