How to Set Up Cron Jobs in cPanel
Automate repetitive tasks like sending emails, clearing caches, and running backups using cPanel cron jobs.
Setting Up Cron Jobs in cPanel
Cron jobs are scheduled tasks that run automatically at set intervals. Common uses include sending automated emails, clearing caches, running database maintenance, and triggering WordPress scheduled events.
Accessing Cron Jobs
- Log into cPanel
- Go to Advanced → Cron Jobs
Understanding Cron Syntax
A cron job has 5 time fields followed by the command:
* * * * * command
│ │ │ │ │
│ │ │ │ └── Day of week (0–7, 0 and 7 = Sunday)
│ │ │ └──── Month (1–12)
│ │ └────── Day of month (1–31)
│ └──────── Hour (0–23)
└────────── Minute (0–59)
Common Cron Schedules
| Schedule | Cron Expression |
|---|---|
| Every minute | * * * * * |
| Every hour | 0 * * * * |
| Every day at midnight | 0 0 * * * |
| Every Monday at 8 AM | 0 8 * * 1 |
| Every 1st of month | 0 0 1 * * |
WordPress Cron Job Example
WordPress has its own cron system (WP-Cron) that can be unreliable on low-traffic sites. Replace it with a real cron job:
Step 1 — Disable WP-Cron in wp-config.php:define('DISABLE_WP_CRON', true);
Step 2 — Add a cPanel cron job:
*/15 * * * * php /home/yourusername/public_html/wp-cron.php
This runs WP-Cron every 15 minutes reliably.
Adding a Cron Job
- In the Cron Jobs page, scroll to Add New Cron Job
- Select a common setting from the dropdown, or enter custom timing
- In the Command field, enter your command
- Click Add New Cron Job
Finding Your PHP Path
Run this command in Terminal (if available) or ask support:
which php
Common paths: /usr/bin/php or /usr/local/bin/php
Still need help?
Our Kenyan support team is on WhatsApp — real people, not bots. We respond in under 15 minutes.