Offer

Pay yearly and get 2 months free + an extra 30% off your hosting

Claim offer
HostingWeb HostingLiteSpeed and NVMe on FlyPanelfrom ৳100BDIX HostingPeered inside Bangladeshfrom ৳100WordPress HostingTuned for WooCommercefrom ৳1,000
Built in-houseFlyPanel, malware protection, backupsCustom-tailored, included on every plan→
2 months free on yearlyCompare products
ServersVPS HostingKVM with full root accessfrom $20BDIX VPSPeered inside Bangladeshfrom $20Dedicated ServersAMD Ryzen and dual Xeonfrom $250
1 Gbps port, Tier-3 datacentersCustom build
ResourcesKnowledgebaseSetup guides and troubleshootingBlogProduct news and performance tipsAbout Doze HostWho we are and where servers liveNetwork statusLive uptime for every service↗
Register a domainSearch and register a new nameClient areaBilling, services and invoices↗
Talk to an engineer, 24/701795 470074
Talk to us, 24/7Call an engineerReal people, day and night01795 470074Email supportsupport@dozehost.com↗Open a ticket27 min average first response↗
Help yourselfKnowledgebaseSetup guides and troubleshootingBlogProduct news and performance tipsNetwork statusLive uptime for every serviceLive
Client area: billing, services, invoicesLog in
Hosting Web Hosting ৳100/moLiteSpeed, FlyPanel, daily backups BDIX Hosting ৳100/moPeered inside Bangladesh WordPress Hosting ৳1,000/moTuned for WooCommerce
Servers VPS Hosting $20/moKVM with full root BDIX VPS $20/moPeered inside Bangladesh Dedicated Servers $250/moAMD Ryzen and dual Xeon
Domains
Resources Knowledgebase Blog About Doze Host Network status
Help Call 01795 470074Real engineers, 24/7 Email supportsupport@dozehost.com Open a ticket27 min average first response Knowledgebase Blog
Get started Log in
Home / Knowledgebase / cPanelcPanel

How to Set Up Cron Jobs in cPanel

Last updated July 21, 2026About 2 minutes to read

A cron job runs a command or script automatically on a schedule — clearing a cache every night, sending a scheduled report, or triggering a WordPress task without relying on site visits.

Understanding cron syntax

A cron schedule is five fields: minute, hour, day of month, month, day of week. 0 3 * * * means “at 3:00 AM every day”; */15 * * * * means “every 15 minutes”; 0 0 1 * * means “midnight on the first of every month”.

Creating a cron job in cPanel

  1. Go to Advanced > Cron Jobs.
  2. Under “Add New Cron Job”, either pick a common schedule from the dropdowns or select “Common Settings” for presets like “Once Per Day”.
  3. Enter the command to run — for a PHP script, this is typically php /home/username/public_html/script.php; for a URL-based trigger, wget -q -O /dev/null "https://yourdomain.com/cron-task.php".
  4. Click Add New Cron Job.

PHP scripts vs URL triggers

Running a script directly via the php command (CLI) avoids web server overhead and doesn’t count against HTTP request logs, but the script runs in a command-line PHP context, so it can’t rely on things like $_SERVER['HTTP_HOST'] being set the way it is on a normal page load. Triggering via wget/curl against a URL runs it exactly like a real page load, which is sometimes required by scripts (like WordPress’s own wp-cron.php) written to expect that context.

WordPress specifically

WordPress’s default “cron” only runs when someone visits the site, which is unreliable on low-traffic sites. Disabling that (define('DISABLE_WP_CRON', true); in wp-config.php) and instead adding a real cPanel cron job hitting wp-cron.php every 15 minutes makes scheduled posts, plugin tasks, and backups run reliably regardless of traffic.

Checking it actually ran

cPanel emails the cron’s output to your account’s contact email by default, which gets noisy fast — redirect output to /dev/null (append > /dev/null 2>&1 to the command) once you’ve confirmed it works, and instead have the script itself log to a file if you need an audit trail.

Still stuck?Our support team is here 24/7. A real person replies to every request.