{"id":10897,"date":"2026-06-09T18:45:07","date_gmt":"2026-06-09T18:45:07","guid":{"rendered":"https:\/\/kelma.io\/blog\/guides\/scheduling-cron-jobs\/"},"modified":"2026-06-09T19:43:40","modified_gmt":"2026-06-09T19:43:40","slug":"scheduling-cron-jobs","status":"publish","type":"post","link":"https:\/\/kelma.io\/ar\/knowledge-base\/scheduling-cron-jobs\/","title":{"rendered":"\u062c\u062f\u0648\u0644\u0629 \u0645\u0647\u0627\u0645 cron"},"content":{"rendered":"<p class=\"wp-block-paragraph\">Cron jobs run tasks on a schedule \u2014 publishing posts, sending newsletters, syncing data, or backing things up. WordPress has its own scheduler, but it only fires when someone visits your site, which makes it unreliable on low-traffic sites and a performance drag on busy ones. A real system cron fixes both problems, and Kelma makes it easy to set up.<\/p>\n\n<h2 class=\"wp-block-heading\">Why replace WP-Cron<\/h2>\n<ul class=\"wp-block-list\"><li><strong>Reliability<\/strong> \u2014 a system cron runs exactly on schedule, even with zero visitors.<\/li><li><strong>\u0623\u062f\u0627\u0626\u064a\u0629<\/strong> \u2014 WordPress no longer checks for due tasks on every page load.<\/li><li><strong>Accuracy<\/strong> \u2014 scheduled posts and emails go out on time, every time.<\/li><\/ul>\n\n<h2 class=\"wp-block-heading\">Disable the built-in WP-Cron<\/h2>\n<p class=\"wp-block-paragraph\">First, stop WordPress from running cron on page loads by adding this line to <code>wp-config.php<\/code> (you can edit it over SFTP):<\/p>\n<pre class=\"wp-block-preformatted\">define( 'DISABLE_WP_CRON', true );<\/pre>\n<p class=\"wp-block-paragraph\">This does not disable scheduling \u2014 it just stops the visitor-triggered method so a real cron can take over.<\/p>\n\n<h2 class=\"wp-block-heading\">Add a system cron job<\/h2>\n<ol class=\"wp-block-list\"><li>Open your server or site and go to the <strong>Cron Jobs<\/strong> .<\/li><li>Add a new job that calls WordPress is cron handler on a schedule, for example every five minutes.<\/li><li>Use a command such as the one below, pointed at your site is path.<\/li><\/ol>\n<pre class=\"wp-block-preformatted\">cd \/home\/your-user\/yoursite.com &amp;&amp; php wp-cron.php &gt; \/dev\/null 2&gt;&amp;1<\/pre>\n\n<div class=\"kb-callout note\"><strong>How often?<\/strong> Every <strong>5 minutes<\/strong> suits most sites. Stores with time-sensitive tasks may want every minute; quiet brochure sites are fine with every 15. More frequent than you need just adds load.<\/div>\n\n<h2 class=\"wp-block-heading\">Understanding the schedule<\/h2>\n<p class=\"wp-block-paragraph\">Cron schedules use five fields: minute, hour, day-of-month, month, and day-of-week. A few examples:<\/p>\n<figure class=\"wp-block-table\"><table><thead><tr><th>Schedule<\/th><th>Meaning<\/th><\/tr><\/thead><tbody><tr><td><code>*\/5 * * * *<\/code><\/td><td>Every 5 minutes<\/td><\/tr><tr><td><code>0 * * * *<\/code><\/td><td>Every hour, on the hour<\/td><\/tr><tr><td><code>30 2 * * *<\/code><\/td><td>Every day at 2:30 AM<\/td><\/tr><tr><td><code>0 9 * * 1<\/code><\/td><td>Every Monday at 9:00 AM<\/td><\/tr><\/tbody><\/table><\/figure>\n\n<div class=\"kb-callout tip\"><strong>Tip:<\/strong> After setting up the cron, schedule a test post a few minutes out and confirm it publishes on time. That verifies the whole chain end to end.<\/div>\n\n<h2 class=\"wp-block-heading\">What actually runs on WordPress cron<\/h2>\n<p class=\"wp-block-paragraph\">It is worth knowing what depends on this schedule, because when cron is unreliable, these are the things that quietly break:<\/p>\n<ul class=\"wp-block-list\"><li><strong>Scheduled posts<\/strong> \u2014 articles set to publish at a future time.<\/li><li><strong>Plugin tasks<\/strong> \u2014 newsletter sends, SEO sitemap pings, form follow-ups, and sync jobs.<\/li><li><strong>Maintenance<\/strong> \u2014 clearing transients, checking for updates, and trashing old revisions.<\/li><li><strong>Backups and reports<\/strong> that some plugins schedule internally.<\/li><\/ul>\n<p class=\"wp-block-paragraph\">With a real system cron firing on a fixed schedule, all of these run on time regardless of traffic \u2014 which is exactly why busy stores and low-traffic brochure sites alike benefit from the switch.<\/p>\n\n<h2 class=\"wp-block-heading\">\u0627\u0644\u0623\u0633\u0626\u0644\u0629 \u0627\u0644\u0634\u0627\u0626\u0639\u0629<\/h2>\n<h3 class=\"wp-block-heading\">Will disabling WP-Cron break scheduled posts?<\/h3>\n<p class=\"wp-block-paragraph\">No \u2014 as long as you add a system cron to replace it. The <code>DISABLE_WP_CRON<\/code> constant only turns off the visitor-triggered method; your system cron then runs the same scheduled tasks, more reliably.<\/p>\n<h3 class=\"wp-block-heading\">How often should the cron run?<\/h3>\n<p class=\"wp-block-paragraph\">Every five minutes suits most sites. Increase the frequency only if you have genuinely time-sensitive tasks, since running more often than you need just adds load.<\/p>\n<h3 class=\"wp-block-heading\">How do I know it is working?<\/h3>\n<p class=\"wp-block-paragraph\">Schedule a test post a few minutes ahead and confirm it goes live on time. If it does, your cron chain is healthy from end to end.<\/p>\n\n<h2 class=\"wp-block-heading\">In short<\/h2>\n<p class=\"wp-block-paragraph\">WordPress is built-in scheduler only fires when someone visits your site, which makes it unreliable on quiet sites and a drag on busy ones. Replacing it with a real system cron fixes both: disable WP-Cron with a single line in <code>wp-config.php<\/code>, then add a system cron that runs <code>wp-cron.php<\/code> every few minutes. Scheduled posts publish on time, plugin tasks run dependably, and your pages stop carrying the overhead of checking for due jobs on every load.<\/p>\n\n<h2 class=\"wp-block-heading\">Where to go next<\/h2><div class=\"kb-next\"><a href=\"https:\/\/kelma.io\/ar\/knowledge-base\/connecting-to-your-site-with-ftp-sftp\/\"><b>Connect over SFTP<\/b><span>Edit wp-config.php to disable WP-Cron.<\/span><\/a><a href=\"https:\/\/kelma.io\/ar\/knowledge-base\/creating-redirects\/\"><b>Create redirects<\/b><span>Another server-level power tool.<\/span><\/a><\/div>","protected":false},"excerpt":{"rendered":"<p>\u0646\u0641\u0651\u0630 \u0627\u0644\u0645\u0647\u0627\u0645 \u0627\u0644\u0645\u062c\u062f\u0648\u0644\u0629 \u0628\u0645\u0648\u062b\u0648\u0642\u064a\u0629 \u0639\u0628\u0631 \u0646\u0638\u0627\u0645 cron \u062d\u0642\u064a\u0642\u064a \u2014 \u0648\u0627\u062c\u0639\u0644 \u0645\u062c\u062f\u0648\u0644 \u0648\u0648\u0631\u062f\u0628\u0631\u064a\u0633 \u0627\u0644\u062e\u0627\u0635 \u062f\u0642\u064a\u0642\u064b\u0627 \u0628\u062a\u0639\u0637\u064a\u0644 WP-Cron.<\/p>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[49,56],"tags":[],"class_list":["post-10897","post","type-post","status-publish","format-standard","hentry","category-knowledge-base","category-kelma-dashboard"],"_links":{"self":[{"href":"https:\/\/kelma.io\/ar\/wp-json\/wp\/v2\/posts\/10897","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kelma.io\/ar\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kelma.io\/ar\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kelma.io\/ar\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/kelma.io\/ar\/wp-json\/wp\/v2\/comments?post=10897"}],"version-history":[{"count":3,"href":"https:\/\/kelma.io\/ar\/wp-json\/wp\/v2\/posts\/10897\/revisions"}],"predecessor-version":[{"id":10919,"href":"https:\/\/kelma.io\/ar\/wp-json\/wp\/v2\/posts\/10897\/revisions\/10919"}],"wp:attachment":[{"href":"https:\/\/kelma.io\/ar\/wp-json\/wp\/v2\/media?parent=10897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kelma.io\/ar\/wp-json\/wp\/v2\/categories?post=10897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kelma.io\/ar\/wp-json\/wp\/v2\/tags?post=10897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}