{"id":9987,"date":"2021-07-05T07:27:17","date_gmt":"2021-07-05T07:27:17","guid":{"rendered":"https:\/\/www.xeroom.com\/?page_id=9987"},"modified":"2023-05-01T15:26:28","modified_gmt":"2023-05-01T15:26:28","slug":"xeroom-cron-batch-jobs","status":"publish","type":"page","link":"https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/","title":{"rendered":"How Xeroom Processes Batch Jobs"},"content":{"rendered":"

[et_pb_section fb_built=”1″ fullwidth=”on” _builder_version=”4.16″ global_colors_info=”{}”][et_pb_fullwidth_header title=”How Xeroom Handles Cron Jobs ” text_orientation=”center” _builder_version=”4.19.5″ title_font=”|700|||||||” title_font_size=”44px” background_color=”#21a0c6″ vertical_offset_tablet=”0″ horizontal_offset_tablet=”0″ custom_margin=”0px||0px||false|false” custom_padding=”0px||0px||false|false” z_index_tablet=”500″ title_text_shadow_horizontal_length_tablet=”0px” title_text_shadow_vertical_length_tablet=”0px” title_text_shadow_blur_strength_tablet=”1px” content_text_shadow_horizontal_length_tablet=”0px” content_text_shadow_vertical_length_tablet=”0px” content_text_shadow_blur_strength_tablet=”1px” subhead_text_shadow_horizontal_length_tablet=”0px” subhead_text_shadow_vertical_length_tablet=”0px” subhead_text_shadow_blur_strength_tablet=”1px” content_link_text_shadow_horizontal_length_tablet=”0px” content_link_text_shadow_vertical_length_tablet=”0px” content_link_text_shadow_blur_strength_tablet=”1px” content_ul_text_shadow_horizontal_length_tablet=”0px” content_ul_text_shadow_vertical_length_tablet=”0px” content_ul_text_shadow_blur_strength_tablet=”1px” content_ol_text_shadow_horizontal_length_tablet=”0px” content_ol_text_shadow_vertical_length_tablet=”0px” content_ol_text_shadow_blur_strength_tablet=”1px” content_quote_text_shadow_horizontal_length_tablet=”0px” content_quote_text_shadow_vertical_length_tablet=”0px” content_quote_text_shadow_blur_strength_tablet=”1px” button_one_text_shadow_horizontal_length_tablet=”0px” button_one_text_shadow_vertical_length_tablet=”0px” button_one_text_shadow_blur_strength_tablet=”1px” button_two_text_shadow_horizontal_length_tablet=”0px” button_two_text_shadow_vertical_length_tablet=”0px” button_two_text_shadow_blur_strength_tablet=”1px” box_shadow_horizontal_tablet=”0px” box_shadow_vertical_tablet=”0px” box_shadow_blur_tablet=”40px” box_shadow_spread_tablet=”0px” box_shadow_horizontal_image_tablet=”0px” box_shadow_vertical_image_tablet=”0px” box_shadow_blur_image_tablet=”40px” box_shadow_spread_image_tablet=”0px” box_shadow_horizontal_button_one_tablet=”0px” box_shadow_vertical_button_one_tablet=”0px” box_shadow_blur_button_one_tablet=”40px” box_shadow_spread_button_one_tablet=”0px” box_shadow_horizontal_button_two_tablet=”0px” box_shadow_vertical_button_two_tablet=”0px” box_shadow_blur_button_two_tablet=”40px” box_shadow_spread_button_two_tablet=”0px” text_shadow_horizontal_length_tablet=”0px” text_shadow_vertical_length_tablet=”0px” text_shadow_blur_strength_tablet=”1px” global_colors_info=”{}” button_one_text_size__hover_enabled=”off” button_one_text_size__hover=”null” button_two_text_size__hover_enabled=”off” button_two_text_size__hover=”null” button_one_text_color__hover_enabled=”off” button_one_text_color__hover=”null” button_two_text_color__hover_enabled=”off” button_two_text_color__hover=”null” button_one_border_width__hover_enabled=”off” button_one_border_width__hover=”null” button_two_border_width__hover_enabled=”off” button_two_border_width__hover=”null” button_one_border_color__hover_enabled=”off” button_one_border_color__hover=”null” button_two_border_color__hover_enabled=”off” button_two_border_color__hover=”null” button_one_border_radius__hover_enabled=”off” button_one_border_radius__hover=”null” button_two_border_radius__hover_enabled=”off” button_two_border_radius__hover=”null” button_one_letter_spacing__hover_enabled=”off” button_one_letter_spacing__hover=”null” button_two_letter_spacing__hover_enabled=”off” button_two_letter_spacing__hover=”null” button_one_bg_color__hover_enabled=”off” button_one_bg_color__hover=”null” button_two_bg_color__hover_enabled=”off” button_two_bg_color__hover=”null”][\/et_pb_fullwidth_header][\/et_pb_section][et_pb_section fb_built=”1″ fullwidth=”on” _builder_version=”4.16″ background_color=”#21a0c6″ global_colors_info=”{}”][et_pb_fullwidth_image src=”https:\/\/www.xeroom.com\/wp-content\/uploads\/2021\/07\/Xeroom_cronjob.jpg” _builder_version=”4.19.5″ background_color=”#21a0c6″ vertical_offset_tablet=”0″ horizontal_offset_tablet=”0″ max_width=”25%” module_alignment=”center” height=”352px” max_height=”353px” hover_enabled=”0″ z_index_tablet=”500″ box_shadow_horizontal_tablet=”0px” box_shadow_vertical_tablet=”0px” box_shadow_blur_tablet=”40px” box_shadow_spread_tablet=”0px” global_colors_info=”{}” sticky_enabled=”0″]
\n[\/et_pb_fullwidth_image][\/et_pb_section][et_pb_section fb_built=”1″ _builder_version=”4.16″ global_colors_info=”{}”][et_pb_row _builder_version=”4.16″ background_size=”initial” background_position=”top_left” background_repeat=”repeat” global_colors_info=”{}”][et_pb_column type=”4_4″ _builder_version=”4.16″ custom_padding=”|||” global_colors_info=”{}” custom_padding__hover=”|||”][et_pb_text _builder_version=”4.16″ vertical_offset_tablet=”0″ horizontal_offset_tablet=”0″ z_index_tablet=”500″ text_text_shadow_horizontal_length_tablet=”0px” text_text_shadow_vertical_length_tablet=”0px” text_text_shadow_blur_strength_tablet=”1px” link_text_shadow_horizontal_length_tablet=”0px” link_text_shadow_vertical_length_tablet=”0px” link_text_shadow_blur_strength_tablet=”1px” ul_text_shadow_horizontal_length_tablet=”0px” ul_text_shadow_vertical_length_tablet=”0px” ul_text_shadow_blur_strength_tablet=”1px” ol_text_shadow_horizontal_length_tablet=”0px” ol_text_shadow_vertical_length_tablet=”0px” ol_text_shadow_blur_strength_tablet=”1px” quote_text_shadow_horizontal_length_tablet=”0px” quote_text_shadow_vertical_length_tablet=”0px” quote_text_shadow_blur_strength_tablet=”1px” header_text_shadow_horizontal_length_tablet=”0px” header_text_shadow_vertical_length_tablet=”0px” header_text_shadow_blur_strength_tablet=”1px” header_2_text_shadow_horizontal_length_tablet=”0px” header_2_text_shadow_vertical_length_tablet=”0px” header_2_text_shadow_blur_strength_tablet=”1px” header_3_text_shadow_horizontal_length_tablet=”0px” header_3_text_shadow_vertical_length_tablet=”0px” header_3_text_shadow_blur_strength_tablet=”1px” header_4_text_shadow_horizontal_length_tablet=”0px” header_4_text_shadow_vertical_length_tablet=”0px” header_4_text_shadow_blur_strength_tablet=”1px” header_5_text_shadow_horizontal_length_tablet=”0px” header_5_text_shadow_vertical_length_tablet=”0px” header_5_text_shadow_blur_strength_tablet=”1px” header_6_text_shadow_horizontal_length_tablet=”0px” header_6_text_shadow_vertical_length_tablet=”0px” header_6_text_shadow_blur_strength_tablet=”1px” box_shadow_horizontal_tablet=”0px” box_shadow_vertical_tablet=”0px” box_shadow_blur_tablet=”40px” box_shadow_spread_tablet=”0px” global_colors_info=”{}”]<\/p>\n

How <\/strong>Xeroom Runs Batch Jobs Using Cron<\/strong><\/h2>\n
\n
Xeroom handles the order Bulk Send and inventory synch processes by spawning a cron job hook which is handed over to WP to execute.\u00a0 WP will execute it whether by the default wp-cron,\u00a0 from cpanel or a third party service.\u00a0 WP-cron is sometimes turned off by hosts and\/or replaced by a scheduled running of all requests.\u00a0 If cron is set to run too frequently ie mover than once every 5 minutes and the user repeatedly triggers the request due to seeing it not run then there can be a big load placed on the server due to one job not completing before the others are started which can lead to the server going slower and slower and freezing for a while.<\/p>\n<\/div>\n
<\/div>\n
So when you do the Bulk Send action you should see that job kicked off and be processed, it won’t always be instant as it is due to the cron schedule and what other processes are running. \u00a0The bulk orders setting should be set to 4. \u00a0Here is a video to explain it.\u00a0https:\/\/d.pr\/v\/yS4hEd<\/a>\u00a0 It should run after a minute or two and we have added a cancel button in case it remains suspended.<\/p>\n<\/div>\n
<\/div>\n
The cronjob scheduler plugin if used will tell you to disable the default wp-cron processer by putting this statement in wp-config and then to create a unix job in cpanel for your server\u00a0\u00a0define(‘DISABLE_WP_CRON’, true);<\/p>\n<\/div>\n
However our experience is that some hosts will override or control this.\u00a0 \u00a0The WP crontrol plugin will enable you to see what is going on with your wp-cron system and show you all the events and schedules.\u00a0 If it is not running then you need to speak to your host to determine why. You can also check the cron logs on your server https:\/\/cronitor.io\/cron-reference\/where-are-cron-logs-stored<\/a> Note that cron is used by other parts of WordPress and detailed in the articles below.<\/p>\n<\/div>\n
<\/div>\n
1. Install the WP Crontrol plugin and update the attached file in your Xeroom plugin directory.<\/div>\n
2. Set the batch send number to 4 in Xeroom settings<\/div>\n
3. Run a Batch send and check if the cron job is spawned – If other cron jobs are running and no Xeroom job is spawned then there is something preventing it.\u00a0 Try a few times and if it never appears let us know.\u00a0 If it does appear then the problem is with the cron not running.<\/div>\n
4. Check to see if WP-cron is disabled or not and if it is how cron jobs are run on your server.<\/p>\n<\/div>\n
<\/div>\n
<\/div>\n
\n
<\/div>\n
<\/div>\n
<\/div>\n
<\/div>\n
<\/div>\n

<\/b><\/h2>\n

<\/b><\/h2>\n

Further reading\/info on WordPress Cron Jobs<\/b><\/h2>\n
<\/div>\n
1. A very handy article\u00a0https:\/\/themeisle.com\/blog\/disable-wp-cron\/<\/a><\/div>\n
<\/div>\n
2. From the WordPress handbook\u00a0https:\/\/developer.wordpress.org\/plugins\/cron\/<\/a><\/div>\n
\u00a0<\/b><\/div>\n
What is WP-Cron?<\/b><\/div>\n
<\/div>\n
WP-Cron is how WordPress handles scheduling time-based tasks in WordPress. Several WordPress core features, such as checking for updates and publishing scheduled post, utilize WP-Cron. The \u201cCron\u201d part of the name comes from the cron time-based task scheduling system that is available on UNIX systems.<\/div>\n
\n

WP-Cron works by checking, on every page load, a list of scheduled tasks to see what needs to be run. Any tasks due to run will be called during that page load.\u00a0:WP-Cron does not run constantly as the system cron does; it is only triggered on page load.\u00a0Scheduling errors could occur if you schedule a task for 2:00PM and no page loads\u00a0occur until 5:00PM.<\/p>\n

 <\/p>\n<\/div>\n

Why use WP-Cron?<\/b><\/div>\n
<\/div>\n
\u00b7\u00a0WordPress core and many plugins need a scheduling system to perform time-based tasks. However, many\u00a0hosting services are shared and do not provide\u00a0access to the system scheduler.<\/div>\n
\u00b7\u00a0Using the WordPress API is a simpler method for setting scheduled tasks than going outside of WordPress to the system scheduler.<\/div>\n
\u00b7\u00a0With the system scheduler, if the time passes and the task did not run, it will not be re-attempted. With WP-Cron, all scheduled tasks are put into a queue and will run at the next opportunity (meaning the next page load). So while you can\u2019t be 100% sure\u00a0when<\/em>\u00a0your task will run, you can be 100% sure that it will run\u00a0eventually<\/em>.<\/div>\n<\/div>\n<\/div>\n
\n
\n
\n
\n
<\/div>\n
<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n

[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"

How Xeroom Runs Batch Jobs Using Cron Xeroom handles the order Bulk Send and inventory synch processes by spawning a cron job hook which is handed over to WP to execute.\u00a0 WP will execute it whether by the default wp-cron,\u00a0 from cpanel or a third party service.\u00a0 WP-cron is sometimes turned off by hosts and\/or […]<\/p>\n","protected":false},"author":1,"featured_media":9988,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"

Support<\/h2>

Our support page is hosted on the WordPress.org\u00a0\u00a0main site<\/a>.<\/p>","_et_gb_content_width":"","footnotes":""},"yoast_head":"\nXeroom batch and inventory job processing using cron<\/title>\n<meta name=\"description\" content=\"Understand how Xeroom runs batch jobs such as order batch send and inventory synch using cron. Common issues with wp cron.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Xeroom batch and inventory job processing using cron\" \/>\n<meta property=\"og:description\" content=\"Understand how Xeroom runs batch jobs such as order batch send and inventory synch using cron. Common issues with wp cron.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/\" \/>\n<meta property=\"og:site_name\" content=\"Xeroom\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-01T15:26:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.xeroom.com\/wp-content\/uploads\/2021\/07\/Xeroom_cronjob.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"750\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/\",\"url\":\"https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/\",\"name\":\"Xeroom batch and inventory job processing using cron\",\"isPartOf\":{\"@id\":\"https:\/\/www.xeroom.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.xeroom.com\/wp-content\/uploads\/2021\/07\/Xeroom_cronjob.jpg\",\"datePublished\":\"2021-07-05T07:27:17+00:00\",\"dateModified\":\"2023-05-01T15:26:28+00:00\",\"description\":\"Understand how Xeroom runs batch jobs such as order batch send and inventory synch using cron. Common issues with wp cron.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/#primaryimage\",\"url\":\"https:\/\/www.xeroom.com\/wp-content\/uploads\/2021\/07\/Xeroom_cronjob.jpg\",\"contentUrl\":\"https:\/\/www.xeroom.com\/wp-content\/uploads\/2021\/07\/Xeroom_cronjob.jpg\",\"width\":1000,\"height\":750},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.xeroom.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How Xeroom Processes Batch Jobs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.xeroom.com\/#website\",\"url\":\"https:\/\/www.xeroom.com\/\",\"name\":\"Xeroom\",\"description\":\"Full Xero Accounts Integration with WooCommerce\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.xeroom.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Xeroom batch and inventory job processing using cron","description":"Understand how Xeroom runs batch jobs such as order batch send and inventory synch using cron. Common issues with wp cron.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/","og_locale":"en_US","og_type":"article","og_title":"Xeroom batch and inventory job processing using cron","og_description":"Understand how Xeroom runs batch jobs such as order batch send and inventory synch using cron. Common issues with wp cron.","og_url":"https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/","og_site_name":"Xeroom","article_modified_time":"2023-05-01T15:26:28+00:00","og_image":[{"width":1000,"height":750,"url":"https:\/\/www.xeroom.com\/wp-content\/uploads\/2021\/07\/Xeroom_cronjob.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/","url":"https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/","name":"Xeroom batch and inventory job processing using cron","isPartOf":{"@id":"https:\/\/www.xeroom.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/#primaryimage"},"image":{"@id":"https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/#primaryimage"},"thumbnailUrl":"https:\/\/www.xeroom.com\/wp-content\/uploads\/2021\/07\/Xeroom_cronjob.jpg","datePublished":"2021-07-05T07:27:17+00:00","dateModified":"2023-05-01T15:26:28+00:00","description":"Understand how Xeroom runs batch jobs such as order batch send and inventory synch using cron. Common issues with wp cron.","breadcrumb":{"@id":"https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/#primaryimage","url":"https:\/\/www.xeroom.com\/wp-content\/uploads\/2021\/07\/Xeroom_cronjob.jpg","contentUrl":"https:\/\/www.xeroom.com\/wp-content\/uploads\/2021\/07\/Xeroom_cronjob.jpg","width":1000,"height":750},{"@type":"BreadcrumbList","@id":"https:\/\/www.xeroom.com\/xeroom-cron-batch-jobs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.xeroom.com\/"},{"@type":"ListItem","position":2,"name":"How Xeroom Processes Batch Jobs"}]},{"@type":"WebSite","@id":"https:\/\/www.xeroom.com\/#website","url":"https:\/\/www.xeroom.com\/","name":"Xeroom","description":"Full Xero Accounts Integration with WooCommerce","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.xeroom.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.xeroom.com\/wp-json\/wp\/v2\/pages\/9987"}],"collection":[{"href":"https:\/\/www.xeroom.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.xeroom.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.xeroom.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xeroom.com\/wp-json\/wp\/v2\/comments?post=9987"}],"version-history":[{"count":0,"href":"https:\/\/www.xeroom.com\/wp-json\/wp\/v2\/pages\/9987\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.xeroom.com\/wp-json\/wp\/v2\/media\/9988"}],"wp:attachment":[{"href":"https:\/\/www.xeroom.com\/wp-json\/wp\/v2\/media?parent=9987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}