Run Weekly Friday Afternoon Tasks | CronBase

cron expression Standard
$ 0 17 * * 5

Every Friday afternoon at five o'clock

This cron expression schedules a task to execute weekly every Friday at exactly 5:00 PM. It is widely used in enterprise environments for compiling weekly business reports, triggering pre-weekend database backups, or shutting down non-essential staging environments to optimize cloud infrastructure costs over the weekend.

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

Next 5 Runs

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

* Tools

Code & Implementations

Bash
#!/usr/bin/env bash
# System crontab entry for Friday 5:00 PM execution
# Save this to /etc/cron.d/friday_cleanup or install via 'crontab -e'

# Ensure the execution environment has correct paths
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# Run the weekly backup script and redirect both stdout and stderr to a log file
0 17 * * 5 /usr/local/bin/weekly-backup-runner.sh >> /var/log/weekly-backup.log 2>&1
Setup notes

Add this line to your system crontab using 'crontab -e' or place it in a dedicated file under /etc/cron.d/ with proper user execution permissions.

Last verified:

Partner UptimeRobot

Keep this cron job monitored 24/7

UptimeRobot alerts you the moment a scheduled job stops responding. Free plan monitors up to 50 endpoints — no credit card required.

Platform Equivalents

AWS EventBridge

Standard cron expressions often need conversion for AWS EventBridge schedules.

EventBridge Rule
cron(0 17 ? * 5 *)

Systemd Timer

OnCalendarFri *-*-* 17:00:00

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

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

[Install]
WantedBy=timers.target

Last verified:

Frequently Asked Questions

How does daylight saving time affect this Friday 5 PM schedule?

If your system clock is set to a local timezone that observes DST, the execution will shift relative to UTC twice a year. To maintain a consistent absolute interval or avoid running during transition hours, configure your cron daemon or orchestrator to run strictly on UTC.

Is it safe to run production deployments using this Friday afternoon cadence?

Generally, deploying software changes at 5:00 PM on a Friday is discouraged to prevent weekend on-call fatigue. However, it is an excellent window for read-only tasks, staging environment teardowns, or generating weekly performance metrics.

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

Standard cron daemons will skip the execution entirely if the system is offline during the exact minute. If you require guaranteed execution once the server recovers, consider using tools like anacron or configuring a modern workflow orchestrator with retry policies.

How can I add a random delay to prevent resource spikes at 5:00 PM?

To prevent multiple instances from hitting your databases simultaneously, you can introduce a random sleep command in your execution script. For example, prepending 'sleep $((RANDOM % 300))' will spread the start times across a five-minute window.

Can I run this schedule on both Friday and Saturday at 5 PM?

Yes, you can modify the day-of-week field to include Saturday. By changing the expression to '0 17 * * 5,6', the system will trigger the specified job at 5:00 PM on both Fridays and Saturdays.

* Explore

Related expressions you might need

Last verified:

Was this helpful?