Cron Job

Updated: July 15, 2026
By Willya Randika

A cron job is a scheduled server task: “run this command daily at 02:00”, “every fifteen minutes”, and so on. Hosting uses cron for backups, mail queues, stock sync, alternative wp-cron, and routine maintenance scripts that repeat.

Badly timed cron can wake the site at peak hours and contribute to Entry Process limits. Reliable cron, on the other hand, makes recurring work independent of human traffic to the website. A good schedule balances business needs with the capacity of your hosting plan.

A Simple Analogy

Cron is a recurring alarm plus a to-do list. The alarm rings, the system runs the command, then sleeps until the next schedule. If the alarm fires every minute for heavy work, the “house” (server) never rests calmly.

Common Format

Many panels show five time fields plus a command:

* * * * *  command
│ │ │ │ │
│ │ │ │ └── day of week
│ │ │ └──── month
│ │ └────── day of month
│ └──────── hour
└────────── minute

Example: 0 2 * * * means every day at 02:00. In cPanel open Cron Jobs — use presets or advanced mode.

Example Uses

  • Hitting wp-cron.php over HTTP or WP-CLI
  • Cleaning logs or caches
  • Generating sitemaps or syncing feeds off-peak
  • Dumping databases to external storage (keep credentials safe)

What to Watch For

  • Run heavy jobs (full backups, imports) off-peak
  • Send output to a log or /dev/null intentionally — cron email can flood inboxes
  • Use absolute paths for PHP/CLI (which php)
  • Duplicate crons (panel + plugin + systemd) mean double work
  • Test the command manually over SSH before scheduling it

FAQ

Does WordPress need server cron?

WordPress ships visitor-triggered WP-Cron. For low traffic or critical jobs, a system cron hitting wp-cron.php is more reliable.

My cron never runs?

Check permissions, paths, the executing user, and error logs. Shared hosts may block some CLI binaries.

Is every-minute cron OK?

Technically yes, but it costs resources. Keep scripts fast and justify the frequency.

Cron keeps emailing me?

The command produces output. Redirect stdout/stderr to a log file or discard output if you do not need notices.

Disclaimer: Hosting Wiki articles are prepared for educational and reference purposes. Hosting technology keeps evolving, so some technical details may change over time.