Skip to content
+2 (02) 20824060+2 012 77002700Pay in EGP: Fawry · InstaPay · Cards

How to Set Up Cron Jobs in cPanel

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

  1. In cPanel open Cron Jobs in the Advanced section.
  2. Under Common Settings pick a ready schedule such as Once Per Hour, or fill in Minute, Hour, Day, Month and Weekday yourself.
  3. Type the command in Command.
  4. 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

Need help choosing?Tell us about your project and we will recommend the right solution.
Contact us