A cron job is a scheduled command that your server runs automatically at set times, for example every night at 2 a.m. or every five minutes. In cPanel you set one up from the Cron Jobs tool: pick how often it should run, paste the command to execute, and save. This guide walks through the whole process on the standard cPanel (Jupiter) interface, explains the timing fields, and covers common commands for WordPress and PHP scripts.

What cron jobs are used for

Cron is the built-in task scheduler on Linux servers. Typical uses on a hosting account include triggering WordPress scheduled posts and maintenance, running a backup or database cleanup script, rotating logs, sending queued email, and pinging an external service. Because the job runs on the server rather than depending on a visitor loading a page, it fires reliably even when your site has no traffic.

Open the Cron Jobs tool

  1. Log in to cPanel.
  2. In the search box at the top, type cron, or scroll to the Advanced section.
  3. Click Cron Jobs.

At the top you can optionally add a Cron Email address. The server sends the command output to that address every time the job runs. Leave it set while you test, then clear it later if the job is noisy and working correctly.

Understand the timing fields

A cron schedule has five time fields, read left to right: minute, hour, day of month, month, and day of week. An asterisk * means every value. cPanel gives you a dropdown of common presets, but knowing the raw fields lets you build any schedule.

Minute 0 to 59 Hour 0 to 23 Day of month 1 to 31 Month 1 to 12 Day of week 0 to 6 0 2 * * * runs every day at 2:00 a.m. server time an asterisk (*) in a field means every value

A few common patterns:

  • */5 * * * * every 5 minutes
  • 0 * * * * once an hour, on the hour
  • 0 2 * * * daily at 2:00 a.m.
  • 30 3 * * 1 every Monday at 3:30 a.m.
  • 0 0 1 * * at midnight on the first of each month

If you are not sure how a schedule reads, a syntax helper such as crontab.guru translates the five fields into plain English.

Add the command

In the Add New Cron Job box, choose a preset from Common Settings or fill in the five fields yourself, then enter the command. Use full, absolute paths so cron can find everything. Some examples:

# Run a PHP maintenance script with the account PHP binary
/usr/local/bin/php /home/username/public_html/cron/task.php

# Trigger WordPress scheduled tasks reliably
/usr/local/bin/php /home/username/public_html/wp-cron.php

# Fetch a URL quietly (no output stored)
/usr/bin/curl -s https://www.example.com/cron-endpoint.php >/dev/null 2>&1

Replace username with your cPanel user and adjust the path to match your document root. Redirecting output with >/dev/null 2>&1 stops the server from emailing you on every run once you have confirmed the job works.

WordPress note

WordPress ships with its own pseudo cron, wp-cron.php, which only fires when someone visits the site. On a low traffic site scheduled posts and plugin tasks can lag. The reliable fix is to disable the visitor based trigger by adding define('DISABLE_WP_CRON', true); to wp-config.php, then create a real cron job that calls wp-cron.php on a fixed schedule such as every 15 minutes. See our WordPress guides for the full walkthrough.

Save, test, and manage jobs

  1. Click Add New Cron Job to save it.
  2. The job appears under Current Cron Jobs, where you can Edit or Delete it later.
  3. To test quickly, set the schedule a couple of minutes ahead, watch for the result or the confirmation email, then change it back to the real schedule.

All cron times use the server time zone, which may differ from your local time, so convert accordingly. Keep the total number of frequent jobs modest, since every run consumes CPU and memory on your account. On our CloudLinux and LiteSpeed platform each account has isolated resources, so a scheduled task on your site never competes with a neighbor. If a job will not run and you have checked the paths, our team can look at the account level settings for you through support.

Was this answer helpful? 0 Users Found This Useful (0 Votes)