Skip to content
Free website migration on every plan, done by our team.Learn more ›
Guides

Cron jobs explained: schedule tasks on your hosting

What cron jobs are, how the five-field schedule works, how to add one in cPanel, and how to replace WordPress's built-in cron with a real one.

Short answer: A cron job runs a command automatically on a schedule, such as every 15 minutes or every night at 2am. You add them in cPanel under Cron Jobs. They're used for backups, reports, cleanup tasks and reliable WordPress scheduling.

How the schedule works

A cron schedule has five fields: minute, hour, day of month, month and day of week.

ScheduleMeaning
/15 *Every 15 minutes
0 2 *Every day at 02:00
0 9 1Every Monday at 09:00
0 0 1 First day of every month at midnight

The server's time zone applies, so check it before scheduling.

Add a cron job in cPanel

  1. Open Cron Jobs.
  2. Choose a common setting or type the five fields.
  3. Enter the command, for example /usr/local/bin/php /home/username/public_html/script.php.
  4. Save, and set a notification email if you want the output.

Use a real cron for WordPress

WordPress runs scheduled tasks only when someone visits, which is unreliable on quiet sites and wasteful on busy ones.

  1. Add define('DISABLE_WP_CRON', true); to wp-config.php.
  2. Add a cron job every 15 minutes that runs wget -q -O - https://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1.

Good practice

  • Don't schedule heavy jobs every minute; it can hit resource limits.
  • Send output to /dev/null unless you need it, or your inbox fills up.
  • Test the command over SSH first. See how to use SSH.

Frequently asked questions

Why isn't my cron job running?

Common causes: a wrong path to PHP or the script, a typo in the schedule, or file permissions.

How often can cron jobs run?

Every minute at most, but most tasks need far less.

Can a cron job slow my site?

A heavy one can. Schedule big tasks for quiet hours.

Ready when you are

Host it where it performs

NVMe speed, offshore privacy and a written SLA — live in minutes on AuroxHost.