{"id":1950707,"date":"2021-08-20T04:06:30","date_gmt":"2021-08-20T08:06:30","guid":{"rendered":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/?post_type=tribe-knowledgebase&#038;p=1950707"},"modified":"2021-09-14T04:04:23","modified_gmt":"2021-09-14T08:04:23","slug":"how-to-disable-wp-cron-and-set-up-a-real-cron-job","status":"publish","type":"post","link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/how-to-disable-wp-cron-and-set-up-a-real-cron-job\/","title":{"rendered":"How to Disable WP-Cron and Set up a Real Cron Job"},"content":{"rendered":"\n<p>Cron jobs in WordPress are used to schedule events, like Event Aggregator scheduled imports. They are <em>supposed<\/em> to work on a set schedule, but sometimes they don&#8217;t trigger at the proper intervals depending on factors like site traffic and they can affect your site&#8217;s performance.<\/p>\n\n\n\n<p>If you are running into issues with WP-Cron, we&#8217;d recommend you disable it and set up a real cron job, which you can do through your hosting provider.<\/p>\n\n\n\n<p>We&#8217;ll walk you through those steps so that your imports come through at the time you scheduled them for.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-disable-wp-cron\">Disable WP-Cron<\/h2>\n\n\n\n<p>The first thing you&#8217;ll want to do is to disable WP-Cron on your WordPress site. In order to do that, navigate to your <strong>wp-config.php<\/strong> file in your main WordPress folder and add the following line before the \u201c<em>\/* That\u2019s all, stop editing! Happy blogging. *\/<\/em>\u201d line:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ndefine(&#039;DISABLE_WP_CRON&#039;, true);\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-setting-up-a-real-cron-job\">Setting Up a Real Cron Job<\/h2>\n\n\n\n<p>There are a few different ways to set up a real cron job for your WordPress site. This will depend on the hosting provider that you have. In any case, you&#8217;ll want to log in to your web hosting control panel and navigate to the <strong>Cron Jobs <\/strong>section.<\/p>\n\n\n\n<p>Next, you may see some options to specify how frequently you&#8217;d like the cron job to trigger. Your hosting provider may have limits on the frequency, but go ahead and update your preferences in the settings.<\/p>\n\n\n\n<p>Lastly, you&#8217;ll want to add a <strong>Command<\/strong> to complete the process. Again, it may differ slightly depending on your host, but it will look something like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nwget -q -O - https:\/\/domain.com\/wp-cron.php?doing_wp_cron &gt;\/dev\/null 2&gt;&amp;amp;1\n<\/pre><\/div>\n\n\n<p>Don&#8217;t forget to change domain.com to your website. Now click <strong>Add New Cron Job<\/strong> and you&#8217;re good to go!<\/p>\n\n\n\n<p>Note: If your hosting provider does not include a cron service, you can use a <a href=\"https:\/\/cron-job.org\/en\/\" target=\"_blank\" rel=\"noreferrer noopener\">free external cron service<\/a> instead.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cron jobs in WordPress are used to schedule events, like Event Aggregator scheduled imports. They are supposed to work on a set schedule, but sometimes they don&#8217;t trigger at the proper intervals depending on factors like site traffic and they can affect your site&#8217;s performance. If you are running into issues with WP-Cron, we&#8217;d recommend&#8230;<\/p>\n","protected":false},"author":3,"featured_media":1955565,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[1],"tags":[],"stellar-product-taxonomy":[154],"class_list":["post-1950707","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","stellar-product-taxonomy-event-aggregator"],"acf":[],"taxonomy_info":{"category":[{"value":1,"label":"Uncategorized"}],"stellar-product-taxonomy":[{"value":154,"label":"Event Aggregator"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Jaime Marchwinski","author_link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/author\/jaimetri-be\/"},"comment_info":0,"category_info":[{"term_id":1,"name":"Uncategorized","slug":"uncategorized","term_group":0,"term_taxonomy_id":1,"taxonomy":"category","description":"","parent":0,"count":139,"filter":"raw","term_order":"0","cat_ID":1,"category_count":139,"category_description":"","cat_name":"Uncategorized","category_nicename":"uncategorized","category_parent":0}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1950707","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1950707"}],"version-history":[{"count":1,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1950707\/revisions"}],"predecessor-version":[{"id":1955922,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1950707\/revisions\/1955922"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1950707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1950707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1950707"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1950707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}