Glossary · Cloud & Hosting

Cron Job

A cron job is a task scheduled to run automatically at set times on Unix-like systems, defined by a cron expression.

Updated October 6, 2026

A cron job is a command or script that the cron scheduler on Unix-like systems runs automatically at times defined by a five-field schedule expression.

Why it matters

Cron powers routine work: backups, log rotation, report emails, cache cleanup and certificate renewals. Because it runs unattended, failures are silent unless you check them.

Jobs can also overlap if one run takes longer than the interval, so long tasks should use a lock file. That is why heartbeat monitoring is useful: the job pings a URL when it finishes, and an alert fires if the ping does not arrive on time.

Example

# minute hour day-of-month month day-of-week command
30 3 * * 1  /usr/local/bin/weekly-report.sh

This runs the script at 03:30 every Monday, using the server's time zone.

Common mistakes

  • Forgetting that cron uses a minimal environment, so commands fail without full paths.
  • Not checking the time zone, then running jobs at the wrong hour.
  • Sending output nowhere, so errors are never seen.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.