Run Weekly Friday Evening Jobs at 6 PM | CronBase

cron expression Standard
$ 0 18 * * 5

Every Friday evening at six PM

This cron expression schedules a task to run weekly every Friday evening at exactly 6:00 PM. It is commonly deployed in production environments for end-of-week reporting, automated database backups before weekend low-traffic periods, and initiating scheduled maintenance windows that require system-wide validation before operations resume on Monday morning.

Minute
0
Hour
18
Day of Month
*
Month
*
Day of Week
5
How it works

Next 5 Runs

  • in 5d 21h
  • in 12d 21h
  • in 19d 21h
  • in 26d 21h
  • in 33d 21h

* Tools

Code & Implementations

Bash
#!/usr/bin/env bash
# Friday evening backup and maintenance script
set -euo pipefail
LOG_FILE="/var/log/friday_backup.log"
exec >> "$LOG_FILE" 2>&1

echo "[$(date -u +'%Y-%m-%dT%H:%M:%SZ')] Starting weekly maintenance job..."
# Add actual production backup or cleanup logic here
# Example: pg_dump -U postgres dbname > /backups/weekly_$(date +%F).sql
echo "[$(date -u +'%Y-%m-%dT%H:%M:%SZ')] Weekly job completed successfully."
Setup notes

Save the code as /usr/local/bin/weekly-backup.sh, make it executable with 'chmod +x', and register it in your crontab using '0 18 * * 5 /usr/local/bin/weekly-backup.sh'.

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(0 18 ? * 5 *)

Systemd Timer

OnCalendarFri *-*-* 18:00:00

my-task.timer
[Unit]
Description=Timer for cron expression: 0 18 * * 5

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

[Install]
WantedBy=timers.target

Last verified:

Frequently Asked Questions

How does daylight saving time affect a Friday 6 PM cron job?

If your server is set to a local timezone that observes DST, the execution time will shift relative to UTC. To prevent unexpected shifts in business logic, set your cron runner to a fixed timezone like UTC, or ensure your scheduling library explicitly handles DST transitions.

What happens if the server is offline at Friday 18:00?

Standard cron engines (like Vixie cron) do not catch up on missed executions. If your server is offline, the job is skipped entirely until the next Friday. For critical jobs, use an orchestrator like Kubernetes CronJobs with a startingDeadlineSeconds policy, or an external scheduling service.

Can I run this job on both Friday and Saturday at 6 PM?

Yes, you can modify the day-of-week field to include both days. In standard cron, changing the expression to 0 18 * * 5,6 will trigger the job at 6 PM on both Friday (5) and Saturday (6).

How can I safely test this weekly cron job without waiting for Friday?

You should separate your job's execution logic from the scheduling configuration. Test the logic independently by running the script or container manually in a staging environment, and use cron parsing tools to validate that the expression resolves to the correct upcoming Friday.

Is it safe to run heavy database migrations using this schedule?

While Friday at 6 PM is often a low-traffic window for B2B applications, running heavy migrations then can ruin your weekend if things go wrong. It is best practice to run migrations during low-traffic hours with active developer supervision, or use blue-green deployments rather than relying on unmonitored Friday night cron jobs.

* Explore

Related expressions you might need

Last verified:

Was this helpful?