{"id":6209,"date":"2024-03-20T16:35:59","date_gmt":"2024-03-20T20:35:59","guid":{"rendered":"https:\/\/batchpatch.com\/?p=6209"},"modified":"2024-03-20T16:35:59","modified_gmt":"2024-03-20T20:35:59","slug":"executing-an-advanced-multi-row-queue-sequence-as-a-scheduled-task","status":"publish","type":"post","link":"https:\/\/batchpatch.com\/executing-an-advanced-multi-row-queue-sequence-as-a-scheduled-task","title":{"rendered":"Executing an Advanced Multi-Row Queue Sequence as a Scheduled Task"},"content":{"rendered":"<p>If you want to execute an <a href=\"\/advanced-multi-row-queue-sequence\">advanced multi-row queue sequence<\/a> on a specific datetime, you can do it with a scheduled task.  Alternatively, you can also execute an advanced multi-row queue sequence from within a <a href=\"\/using-the-job-queue-in-batchpatch-for-multi-step-execution\">job queue<\/a>.  The job queue can also be executed by a scheduled task, if desired.<\/p>\n<h2 class=\"brownishOrange\">Executing an advanced multi-row queue sequence directly from a scheduled task<\/h2>\n<ol>\n<li>\nIn the screenshot below I have 4 target hosts setup to participate in an advanced multi-row queue sequence with the name <em>TestSequence20240320<\/em><br \/>\n<a href=\"\/wp-content\/uploads\/2024\/03\/2024-03-20-15_44_05.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/03\/2024-03-20-15_44_05.png\" alt=\"\" width=\"649\" height=\"410\" class=\"aligncenter size-full wp-image-6211\" srcset=\"https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-15_44_05.png 649w, https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-15_44_05-300x190.png 300w\" sizes=\"auto, (max-width: 649px) 100vw, 649px\" \/><\/a><\/li>\n<li>Next I set a scheduled task on the <em>Execution Row<\/em> for the sequence.<br \/>\n<a href=\"\/wp-content\/uploads\/2024\/03\/2024-03-20-15_50_07.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/03\/2024-03-20-15_50_07.png\" alt=\"\" width=\"648\" height=\"411\" class=\"aligncenter size-full wp-image-6212\" srcset=\"https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-15_50_07.png 648w, https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-15_50_07-300x190.png 300w\" sizes=\"auto, (max-width: 648px) 100vw, 648px\" \/><\/a>\n<\/li>\n<li>\n<a href=\"\/wp-content\/uploads\/2024\/03\/2024-03-20-15_50_25.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/03\/2024-03-20-15_50_25.png\" alt=\"\" width=\"878\" height=\"410\" class=\"aligncenter size-full wp-image-6214\" srcset=\"https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-15_50_25.png 878w, https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-15_50_25-300x140.png 300w, https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-15_50_25-768x359.png 768w\" sizes=\"auto, (max-width: 878px) 100vw, 878px\" \/><\/a>\n<\/li>\n<li>Finally you can see the result after the scheduled task ran (it started on 15:50 instead of 15:49 because while I was taking screenshots I missed the original run time and had to reschedule it)<br \/>\n<a href=\"\/wp-content\/uploads\/2024\/03\/2024-03-20-16_02_35.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/03\/2024-03-20-16_02_35-1024x332.png\" alt=\"\" width=\"540\" height=\"175\" class=\"aligncenter size-large wp-image-6215\" srcset=\"https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-16_02_35-1024x332.png 1024w, https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-16_02_35-300x97.png 300w, https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-16_02_35-768x249.png 768w, https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-16_02_35.png 1266w\" sizes=\"auto, (max-width: 540px) 100vw, 540px\" \/><\/a>\n<\/li>\n<\/ol>\n<h2 class=\"brownishOrange\">Executing an advanced multi-row queue sequence from within a job queue<\/h2>\n<ol>\n<li>In this example I have 4 target hosts setup to participate in an advanced multi-row queue sequence with the name <em>TestSequence20240320<\/em>.  However, I also have an extra row in the grid that we&#8217;ll use to illustrate executing a job queue that contains an advanced multi-row queue sequence.<br \/>\n<a href=\"\/wp-content\/uploads\/2024\/03\/2024-03-20-16_17_07.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/03\/2024-03-20-16_17_07.png\" alt=\"\" width=\"649\" height=\"410\" class=\"aligncenter size-full wp-image-6217\" srcset=\"https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-16_17_07.png 649w, https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-16_17_07-300x190.png 300w\" sizes=\"auto, (max-width: 649px) 100vw, 649px\" \/><\/a>\n<\/li>\n<li>In the screenshot below I&#8217;ve created a new job queue, and the only step in this particular case is to execute our advanced multi-row queue sequence. Your job queue can contain more steps, but for the sake of this example I only need a single step.<br \/>\n<a href=\"\/wp-content\/uploads\/2024\/03\/2024-03-20-16_18_35.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/03\/2024-03-20-16_18_35.png\" alt=\"\" width=\"1011\" height=\"742\" class=\"aligncenter size-full wp-image-6218\" srcset=\"https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-16_18_35.png 1011w, https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-16_18_35-300x220.png 300w, https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-16_18_35-768x564.png 768w\" sizes=\"auto, (max-width: 1011px) 100vw, 1011px\" \/><\/a>\n<\/li>\n<li>Next, I save the job queue.<br \/>\n<a href=\"\/wp-content\/uploads\/2024\/03\/2024-03-20-16_18_55.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/03\/2024-03-20-16_18_55.png\" alt=\"\" width=\"1012\" height=\"746\" class=\"aligncenter size-full wp-image-6219\" srcset=\"https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-16_18_55.png 1012w, https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-16_18_55-300x221.png 300w, https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-16_18_55-768x566.png 768w\" sizes=\"auto, (max-width: 1012px) 100vw, 1012px\" \/><\/a>\n<\/li>\n<li>Finally, I can manually execute the job queue that I just created.  Alternatively I could setup a scheduled task that will execute the job queue.  In either case, the job queue contains a step that will execute the advanced multi-row queue sequence.<br \/>\n<a href=\"\/wp-content\/uploads\/2024\/03\/2024-03-20-16_23_22.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/03\/2024-03-20-16_23_22-1024x627.png\" alt=\"\" width=\"540\" height=\"331\" class=\"aligncenter size-large wp-image-6220\" srcset=\"https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-16_23_22-1024x627.png 1024w, https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-16_23_22-300x184.png 300w, https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-16_23_22-768x470.png 768w, https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-16_23_22.png 1222w\" sizes=\"auto, (max-width: 540px) 100vw, 540px\" \/><\/a>\n<\/li>\n<li>Here is the result:<br \/>\n<a href=\"\/wp-content\/uploads\/2024\/03\/2024-03-20-16_26_54.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/03\/2024-03-20-16_26_54.png\" alt=\"\" width=\"870\" height=\"410\" class=\"aligncenter size-full wp-image-6224\" srcset=\"https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-16_26_54.png 870w, https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-16_26_54-300x141.png 300w, https:\/\/batchpatch.com\/wp-content\/uploads\/2024\/03\/2024-03-20-16_26_54-768x362.png 768w\" sizes=\"auto, (max-width: 870px) 100vw, 870px\" \/><\/a>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>If you want to execute an advanced multi-row queue sequence on a specific datetime, you can do it with a scheduled task. Alternatively, you can also execute an advanced multi-row queue sequence from within a job queue. The job queue can also be executed by a scheduled task, if desired. Executing an advanced multi-row queue [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1,17,3],"tags":[293,99,108],"class_list":["post-6209","post","type-post","status-publish","format-standard","hentry","category-blog","category-general","category-tutorials","tag-advanced-multi-row-queue-sequence","tag-job-queue","tag-sequence"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/batchpatch.com\/wp-json\/wp\/v2\/posts\/6209","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/batchpatch.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/batchpatch.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/batchpatch.com\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/batchpatch.com\/wp-json\/wp\/v2\/comments?post=6209"}],"version-history":[{"count":6,"href":"https:\/\/batchpatch.com\/wp-json\/wp\/v2\/posts\/6209\/revisions"}],"predecessor-version":[{"id":6226,"href":"https:\/\/batchpatch.com\/wp-json\/wp\/v2\/posts\/6209\/revisions\/6226"}],"wp:attachment":[{"href":"https:\/\/batchpatch.com\/wp-json\/wp\/v2\/media?parent=6209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/batchpatch.com\/wp-json\/wp\/v2\/categories?post=6209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/batchpatch.com\/wp-json\/wp\/v2\/tags?post=6209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}