A cron job runs a command on a schedule: every hour, every night, every Monday. People use it for scheduled backups, clearing old files, sending reports and running WordPress scheduled tasks reliably.
Add a cron job
- In cPanel open Cron Jobs in the Advanced section.
- Under Common Settings pick a ready schedule such as Once Per Hour, or fill in Minute, Hour, Day, Month and Weekday yourself.
- Type the command in Command.
- Click Add New Cron Job.
A schedule of 0 * * * * means minute 0 of every hour. An asterisk means “every”.
Example: run WordPress tasks properly
By default WordPress runs scheduled tasks when someone visits the site. A cron job is more reliable. Add this command every 15 minutes (use the PHP path shown on your server, which is usually like this):
/usr/local/bin/php /home/USERNAME/public_html/wp-cron.php > /dev/null 2>&1
Then add define( ‘DISABLE_WP_CRON’, true ); to wp-config.php, so WordPress does not run tasks twice.
Control the email
cPanel emails the output of every run. Set an address under Cron Email and click Update Email, or leave it empty to turn emails off. To silence one job, end its command with > /dev/null 2>&1.
Edit or delete a job
In the list of current cron jobs, use Edit then Edit Line to change it, or Delete to remove it.
Mistakes to avoid
- Do not run jobs too often. Leave enough time so a run finishes before the next starts, or they pile up and overload your account. See common website errors.
- Use full paths (starting with /home/) for scripts and files.
- Scripts need execute permission to run directly.
- Be very careful with commands that delete files, such as rm. A wrong path can erase your site.

