{"id":18385,"date":"2026-09-29T21:37:48","date_gmt":"2026-09-29T18:37:48","guid":{"rendered":"https:\/\/www.hyyat.com\/knowledgebase\/cpanel-cron-jobs\/"},"modified":"2026-11-22T14:50:54","modified_gmt":"2026-11-22T11:50:54","password":"","slug":"cpanel-cron-jobs","status":"publish","type":"docs","link":"https:\/\/www.hyyat.com\/en\/knowledgebase\/cpanel-cron-jobs\/","title":{"rendered":"Cron Jobs in cPanel: Setup, Timing and Ready-Made Examples for WordPress"},"content":{"rendered":"<div class=\"hkb\" dir=\"ltr\">\n<div class=\"hkb-tldr\"><b>What they are and why you need them<\/b>In <b>Cron Jobs<\/b> pick a timing from <b>Common Settings<\/b> (such as once per hour), type the command and add the job. To stop the email after every run, add <code>&gt;\/dev\/null 2&gt;&amp;1<\/code> at the end of the command.<\/div>\n<div class=\"hy-vid\"><div style=\"width: 1280px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-18385-1\" width=\"1280\" height=\"720\" poster=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hyyat-cpanel-cronjobs-en.jpg\" preload=\"none\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hyyat-cpanel-cronjobs-en.mp4?_=1\" \/><a href=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hyyat-cpanel-cronjobs-en.mp4\">https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hyyat-cpanel-cronjobs-en.mp4<\/a><\/video><\/div><\/div>\n<div class=\"hkb-note\"><b>A question we often get:<\/b> &#8220;I need a script to send a report every morning, and I do not want to run it by hand.&#8221;<\/div>\n<p>That is what cron jobs are for: you give the server a command and a time, and it runs it on schedule without you. They send newsletters, clean temporary files, refresh currency rates in a store and run WordPress tasks regularly.<\/p>\n<h2>The parts of the Cron Jobs page<\/h2>\n<div class=\"hkb-tbl\">\n<table>\n<thead>\n<tr>\n<th>Section<\/th>\n<th>Purpose<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Cron Email<\/td>\n<td>The address that receives the output of each run<\/td>\n<\/tr>\n<tr>\n<td>Add New Cron Job<\/td>\n<td>The timing and the command<\/td>\n<\/tr>\n<tr>\n<td>Current Cron Jobs<\/td>\n<td>Existing jobs with edit and delete buttons<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<figure class=\"hkb-fig\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hkb-pf-en-p-cron.webp\" alt=\"The cPanel Cron Jobs page and the email section\" width=\"800\" height=\"451\" loading=\"lazy\" \/><\/figure>\n<h2>Adding a job<\/h2>\n<ol class=\"hkb-steps\">\n<li><b>Open Cron Jobs<\/b> in the Advanced section of cPanel.<\/li>\n<li><b>Choose from Common Settings<\/b> such as Once Per Hour or Once Per Day. The fields fill in for you.<\/li>\n<li><b>Or set the fields by hand<\/b> minute, hour, day, month and weekday.<\/li>\n<li><b>Type the command<\/b> see the examples below.<\/li>\n<li><b>Click Add New Cron Job<\/b> it appears in the list at the bottom.<\/li>\n<\/ol>\n<figure class=\"hkb-fig\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hkb-pf-en-p-cronadd.webp\" alt=\"The Add New Cron Job form with PHP command examples\" width=\"800\" height=\"451\" loading=\"lazy\" \/><\/figure>\n<h2>Reading the timing fields<\/h2>\n<div class=\"hkb-tbl\">\n<table>\n<thead>\n<tr>\n<th>Timing<\/th>\n<th>Minute<\/th>\n<th>Hour<\/th>\n<th>Day<\/th>\n<th>Month<\/th>\n<th>Weekday<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Every 15 minutes<\/td>\n<td>*\/15<\/td>\n<td>*<\/td>\n<td>*<\/td>\n<td>*<\/td>\n<td>*<\/td>\n<\/tr>\n<tr>\n<td>Every day at 6 am<\/td>\n<td>0<\/td>\n<td>6<\/td>\n<td>*<\/td>\n<td>*<\/td>\n<td>*<\/td>\n<\/tr>\n<tr>\n<td>Every Sunday at midnight<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>*<\/td>\n<td>*<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>The first of every month<\/td>\n<td>0<\/td>\n<td>3<\/td>\n<td>1<\/td>\n<td>*<\/td>\n<td>*<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>An asterisk means &#8220;every&#8221;, and times are server time, not yours. Avoid busy moments such as minute zero of every hour unless needed; pick a random minute such as 17.<\/p>\n<h2>Ready-made commands<\/h2>\n<p><b>Run a PHP file<\/b>; the full path with your account name is shown on the Cron page itself:<\/p>\n<pre class=\"hkb-code\">\/usr\/local\/bin\/php \/home\/USER\/public_html\/script.php &gt;\/dev\/null 2&gt;&amp;1<\/pre>\n<p><b>Call a URL on your site<\/b>, handy for plugins that give you a trigger link:<\/p>\n<pre class=\"hkb-code\">wget -q -O - &quot;https:\/\/example.com\/cron-url&quot; &gt;\/dev\/null 2&gt;&amp;1<\/pre>\n<h2>WordPress: a real wp-cron<\/h2>\n<p>WordPress runs its scheduled tasks when someone visits, so quiet sites run them late and busy sites run them too often. The cleaner fix:<\/p>\n<ol class=\"hkb-steps\">\n<li><b>Add to wp-config.php<\/b> the line <code>define('DISABLE_WP_CRON', true);<\/code> above the &#8220;That&#8217;s all&#8221; line.<\/li>\n<li><b>Create a job every 15 minutes<\/b> with a command that runs <code>wp-cron.php<\/code> in the site folder.<\/li>\n<\/ol>\n<pre class=\"hkb-code\">\/usr\/local\/bin\/php \/home\/USER\/public_html\/wp-cron.php &gt;\/dev\/null 2&gt;&amp;1<\/pre>\n<div class=\"hkb-note\">Replace <code>USER<\/code> with your cPanel username and <code>public_html<\/code> with the domain folder for an addon domain. For a domain-specific PHP version use the path the page suggests, such as <code>\/usr\/local\/bin\/ea-php83<\/code>; check the version in <a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/how-to-change-php-version\/\">MultiPHP Manager<\/a>.<\/div>\n<h2>Common problems<\/h2>\n<div class=\"hkb-tbl\">\n<table>\n<thead>\n<tr>\n<th>Problem<\/th>\n<th>Fix<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>An email arrives after every run<\/td>\n<td>Add <code>&gt;\/dev\/null 2&gt;&amp;1<\/code>, or clear the address in Cron Email<\/td>\n<\/tr>\n<tr>\n<td>The job does not run<\/td>\n<td>Use full paths and check the file permissions<\/td>\n<\/tr>\n<tr>\n<td>The site slows down at job time<\/td>\n<td>Spread the timing; many close jobs use up <a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/monitor-resource-usage-cpanel\/\">account resources<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2>From our support desk<\/h2>\n<ul class=\"hkb-list\">\n<li><b>A customer set a job every minute<\/b> to copy the database, resource usage climbed and the site slowed. Once a night was plenty.<\/li>\n<li><b>A mailbox filled up<\/b> with thousands of cron emails because the command did not redirect its output. Adding <code>&gt;\/dev\/null 2&gt;&amp;1<\/code> stopped the flood.<\/li>\n<li><b>A job never ran<\/b> because it used a relative path such as <code>php script.php<\/code>. Full paths for the file and PHP fixed it.<\/li>\n<\/ul>\n<h2>Frequently asked questions<\/h2>\n<div class=\"hkb-faq\">\n<details>\n<summary>Which time zone do jobs use?<\/summary>\n<p>Server time, which may differ from your country.<\/p>\n<\/details>\n<details>\n<summary>How many jobs can I add?<\/summary>\n<p>There is no practical limit for sensible jobs, but bunching them uses account resources.<\/p>\n<\/details>\n<details>\n<summary>How do I pause a job?<\/summary>\n<p>Edit it and put # at the start of the command, or delete it and add it again later.<\/p>\n<\/details>\n<details>\n<summary>Does a normal WordPress site need cron?<\/summary>\n<p>Not strictly, but it makes scheduled tasks more accurate and lightens the load.<\/p>\n<\/details>\n<details>\n<summary>How do I know the job runs?<\/summary>\n<p>Put your email in Cron Email for a while to get the output, then remove it once sure.<\/p>\n<\/details>\n<details>\n<summary>Can I run a Python script?<\/summary>\n<p>If it is supported on your server, by its full path like any command; ask support for the right path.<\/p>\n<\/details>\n<\/div>\n<div class=\"hkb-rel\"><b>Related guides<\/b><\/p>\n<ul>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/how-to-change-php-version\/\">Change Your PHP Version in cPanel and Turn On Extensions: MultiPHP and Select PHP Version<\/a><\/li>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/monitor-resource-usage-cpanel\/\">Resource Usage in cPanel: Reading CPU, Memory, Processes and What Faults Mean<\/a><\/li>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/cpanel-errors-raw-access-logs\/\">Track Website Errors and Logs in cPanel: the Errors and Raw Access Tools<\/a><\/li>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/how-to-use-file-manager-in-cpanel\/\">cPanel File Manager: Open It, Show Hidden Files, Change Permissions and More<\/a><\/li>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/cpanel-domains-software-section\/\">The Domains and Software Sections in cPanel: Domains, HTTPS Redirect, Zone Editor and PHP Version<\/a><\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.hyyat.com\/en\/kb\/website-control-panel-cpanel\/\">All cPanel guides \u2192<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>What they are and why you need themIn Cron Jobs pick a timing from Common Settings (such as once per hour), type the command and add the job. To stop the email after every run, add &gt;\/dev\/null 2&gt;&amp;1 at the end of the command. A question we often get: &#8220;I need a script to send [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":20962,"comment_status":"open","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"_templately_pack_id":"","_templately_imported_at":"","_templately_source":"","_templately_import_session_id":"","footnotes":""},"doc_category":[2749],"doc_tag":[],"class_list":["post-18385","docs","type-docs","status-publish","has-post-thumbnail","hentry","doc_category-website-control-panel-cpanel"],"year_month":"2026-11","word_count":771,"total_views":"2","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"ahmed fathy","author_nicename":"ahmed-fathy","author_url":"https:\/\/www.hyyat.com\/en\/author\/ahmed-fathy\/"},"doc_category_info":[{"term_name":"cPanel Guides","term_url":"https:\/\/www.hyyat.com\/en\/kb\/website-control-panel-cpanel\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs\/18385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/comments?post=18385"}],"version-history":[{"count":0,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs\/18385\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/media\/20962"}],"wp:attachment":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/media?parent=18385"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/doc_category?post=18385"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/doc_tag?post=18385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}